NYOJ 50 爱摘苹果的小明

原题链接

简单题。

附ac代码:

#include <stdio.h>

int main(){
	int t, a[10], i, height, count;
	scanf("%d", &t);
	while(t--){
		for(i = count = 0; i != 10; ++i)
			scanf("%d", &a[i]);
		scanf("%d", &height);
		height += 30;
		for(i = 0; i != 10; ++i)
			if(height >= a[i]) ++count;
		printf("%d\n", count);
	}
	return 0;
}


posted on 2014-02-11 14:54  长木Qiu  阅读(150)  评论(0编辑  收藏  举报