Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
37315 | ☩Deutschland☩ | 查找特定的值 | C++ | Accepted | 1 MS | 248 KB | 261 | 2024-01-20 10:06:46 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,m,e=0; cin>>n; int ns[n]; for(int i=0;i<=n-1;i++){ cin>>ns[i]; } cin>>m; for(int j=0;j<=n-1;j++){ if(m==ns[j]){ e=j; break; } } cout<<e+1; return 0; }