NYOJ 53 不高兴的小明

原题链接

简单题

附ac代码:

#include <stdio.h>
struct Unhappy{
	int day, time;
};

int main(){
	Unhappy stu;
	int t, a, b;
	scanf("%d", &t);
	while(t--){
		stu.time = stu.day = 0;
		int i = 0;
		while(i++ < 7){
			scanf("%d%d", &a, &b);
			if(a + b - 8 > stu.time)
				stu.time = a + b - 8, stu.day = i;
		}
		printf("%d\n", stu.day);
	}
	return 0;
}


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