| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 44141 | 张淳睿 | 查找特定的值 | C++ | Accepted | 0 MS | 252 KB | 399 | 2024-03-29 14:59:30 |
#include<iostream> using namespace std; int main() { int n,i,j=0; scanf("%d",&n); int a[10000]; for(i=0;i<n;i++){ scanf("%d",&a[i]); } int m; scanf("%d",&m); for(i=0;i<n;i++){ if(a[i]==m){ printf("%d",i+1); j=1; break; } } if(j==0){ printf("-1"); } return 0; }