文章

211

粉丝

0

获赞

998

访问

33.5k

头像
偷菜时间表 题解:
P1053
发布于2026年3月18日 18:03
阅读数 46

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
	cin >> n;
	while(n--){
		int h,m;
		cin >> h;
		getchar();
		cin >> m;
		int sh = h + 13;
		int sm = m + 15;
		if(sm >= 60){
			sm -= 60;
			sh += 1;
		}
		sh %= 24;
		cout << sh << ":" << sm << endl;	
	}	
    return 0;
}

 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发