时间换算
时间换算
/problem-sets/1336959228541747200/problems/1336960847710547968
#include<stdio.h>
struct{
int h;
int m;
int s;
}time;
int main(void)
{
int past;//past<60
scanf("%d:%d:%d",&time.h,&time.m,&time.s);
scanf("%d",&past);
time.h=(time.h+(time.m+(time.s+past)/60)/60)%24;
time.m=(time.m+(time.s+past)/60)%60;
time.s=(time.s+past)%60;
printf("%02d:%02d:%02d",time.h,time.m,time.s);
return 0;
}
浙公网安备 33010602011771号