题解 | 时间转换
#include <stdio.h>
int main()
{
int x,h,m,s;
scanf("%d",&x);
h=x/3600;
m=(x-h*3600)/60;
s=x-h*3600-m*60;
printf("%d %d %d",h,m,s);
return 0;
}
#include <stdio.h>
int main()
{
int x,h,m,s;
scanf("%d",&x);
h=x/3600;
m=(x-h*3600)/60;
s=x-h*3600-m*60;
printf("%d %d %d",h,m,s);
return 0;
}
相关推荐