#include <stdio.h>
int main(){
int begin,time,end;
int hour,min;
scanf("%d %d",&begin,&time);
hour=begin/100;
min=((begin%100)+time)%60;
if(time>=0){
hour=(hour+((begin%100)+time)/60)%24;
}
else{
min+=60;
hour=(hour+((begin%100)+time)/60+23)%24;
}
printf("%d%02d",hour,min); //%02d,确保2位数,不足0补充在左边
return 0;
}
7-2 然后是几点 (15分)
最新推荐文章于 2022-07-31 23:47:42 发布
1万+

被折叠的 条评论
为什么被折叠?



