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

NYOJ 53 不高兴的小明

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

原题链接

简单题

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

抱歉!评论已关闭.