现在的位置: 首页 > 综合 > 正文

NYOJ 50 爱摘苹果的小明

2016年09月29日 ⁄ 综合 ⁄ 共 239字 ⁄ 字号 评论关闭

原题链接

简单题。

附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;
}

抱歉!评论已关闭.