Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
29562 | lnx | 与指定数字相同的数的个数 | C++ | Accepted | 0 MS | 252 KB | 194 | 2023-10-31 18:56:56 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,m,num,h=0; cin>>n>>m; for(int i=1;i<=n;i++){ cin>>num; if(num==m){ h++; } } cout<<h; return 0; }