题解 | #时间转换#
时间转换
https://www.nowcoder.com/practice/c4ae7bcac7f9491b8be82ee516a94899
#include <stdio.h>
int main() {
int seconds;
scanf("%d",&seconds);
int h=seconds/3600;
int m=(seconds-3600*h)/60;
int s=(seconds-3600*h-60*m);
printf("%d %d %d\n",h,m,s);
return 0;
}

查看14道真题和解析