竞赛
考级
151****9879
#include<iostream> using namespace std; int main(){ int num[1010]; int n,m,x=0; cin>>n>>m; for(int i=0;i<n;i++){ cin>>num[i]; if(num[i]==m){ x++; } } cout<<x; return 0; }
lijunhao
136****0580
programmerGYM
#include<iostream> using namespace std; int main(){ int n,m,a,b; cin>>n>>m; for(int i=1;i<=n;i++){ cin>>a; if(a==m) b++; } cout<<b; return 0; }
158****2936
#include<iostream> using namespace std; int main(){ int n,m,g,a=0; cin>>n>>m; for(int i=1;i<=n;i++){ cin>>g; if(g==m){ a=a+1; }
向逸宸
#include<iostream> using namespace std; int main(){ int n,m,sum=0,a; cin>>n>>m; for (int i = 1;i<=n;i++){ cin>>a; if(a==m){ sum+=1; } else{ continue; } } cout<<sum; return 0; }
菜徐坤1323312313242
共27条