2 solutions
- 1
Information
- ID
- 38
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 1
- Tags
- (None)
- # Submissions
- 115
- Accepted
- 55
- Uploaded By
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,d,c=0,f=0;
cin>>a>>b;
while (a>c){
cin>>d;
if (d==b){
f++;
}
c++;
}
cout<<f;
return 0;
}
**************# ######
ni ge da sha bi !!!!!!~~ ~~
是错误答案不要抄
#include<bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; int cnt = 0; for(int i = 1;i <= n;i++) { int x; cin>>x; if(x == m) { cnt++; } } cout<<cnt; return 0; }
这是正解
看不懂