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