Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
24305 | 老方 | 与指定数字相同的数的个数 | C++ | Accepted | 0 MS | 240 KB | 235 | 2023-08-10 13:02:58 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,p,s=0; cin>>n; int ns[n]; for(int i=0;i<n;i++){ cin>>ns[i]; } cin>>p; for(int i=0;i<n;i++){ if(ns[i]==p){ s+=1; } } cout<<s; return 0; }