Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
54299 | 张思存 | 与指定数字相同的数的个数 | C++ | Accepted | 1 MS | 236 KB | 308 | 2024-10-27 09:25:49 |
#include<bits/stdc++.h> using namespace std; int main(){ int n, m, ans = 0; cin >> n; int a[n]; for(int i = 0; i < n; i++){ cin >> a[i]; } cin >> m; for(int i = 0; i < n; i++){ if(a[i] == m){ ans++; } } cout << ans; return 0; }