文章
13
粉丝
171
获赞
8
访问
46.6k
#include <iostream>
using namespace std;
int main() {
int n;
while (scanf("%d", &n) != EOF) {
for (int i = 0; i < n; i++) {
int h, m, sum = 0;
int ans_h = 13, ans_m = 15;
scanf("%d:%d", &h, &m);
sum = h * 60 + m;//将成熟时间统一成分钟
for (int j = 0; j < sum; j++) {
ans_m++;
if (ans_m >= 60) {//分钟超过,增加小时
ans_h++;
ans_m = 0;
if (ans_h >= 24) {//小时超过,置零
ans_h = 0;
}
}
}
printf("%d:%d\n", ans_h, ans_m);
}
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发