#include <stdio.h> int main() { int seconds = 0; int minute = 0; int hour = 0; scanf("%d", &seconds); if(seconds > 0 && seconds < 100000000) { minute = seconds / 60; //求总的分钟 minute = minute % 60; //求显示的分钟,不能超过60分 hour = seconds / 3600; //求总的小时 hour = hour % 24; //求显示的小时,不能超过24个小时 seconds = seconds % 60; //求余下的秒数 } printf("%d %d %d", hour, minute, seconds); return 0; }