文章
40
粉丝
607
获赞
68
访问
419.3k
#include<iostream>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 0;i < n;i++) {
int a, b;
int hour=13, min=15;
char c;
cin >> a >> c >> b;
hour = hour + a;
min = min + b;
if (min>=60) {
min = min - 60;
hour++;
}
if (hour >= 24) {
hour = hour - 24;
}
cout << hour << ":" << min << endl;
}
return 0;
}
全局变量和局部变量以及归零要注意;
登录后发布评论
暂无评论,来抢沙发