PRoblem Link:http://139.129.36.234/problem.php?id=1204
380 60 9060285 660560 75 90 55 75750样例输出
102提示
来源
2006年浙江大学计算机及软件工程研究生机试真题
AC code:
#include<iostream>#include<algorithm>#include<stdio.h>#include<map>#include<math.h>#include<string.h>#include<queue>#include<map>#include<vector>#include<set>#define LL long long#define exp 1e-9#define MAXN 1000010using namespace std;int a[1010];int main(){// freopen("D://in.txt","r",stdin); int n,i,m,ans; while(scanf("%d",&n)!=EOF && n) { for(i=0;i<n;i++) { scanf("%d",&a[i]); } scanf("%d",&m); ans=0; for(i=0;i<n;i++) { if(a[i]==m) ans++; } printf("%d/n",ans); } return 0;}
新闻热点
疑难解答