[Zhengqing] [1755] Statistics!

Problem Description

Loading...

Problem Analysis

Nothing much to say~

cpp
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#include<stdio.h>
int main() {
	int N,X,i,g;
	int a[12];
	while(scanf("%d %d",&N,&X)!=EOF) {
		for(i=0; i<N; i++)
			scanf("%d",&a[i]);
		for(g=0,i=0; i<N; i++) {
			if(a[i]>X)
				g++;
		}
		printf("%d\n",g);
	}
	return 0;
}

Problem link: [ZZULI][1755]Statistics!

This post is licensed under CC BY-NC-SA 4.0. If it helped, or if you have anything to say, the comment box below is open.
Page views —
Unique visitors —

Loading...