#define CLK_TCK 100 #include<stdio.h> int main() { int h,m,s; double c1,c2,c3; scanf("%lf %lf",&c1,&c2); c3=(c2-c1)/CLK_TCK; s=c3+0.5; h=s/3600; s=s%3600; m=s/60; s=s%60; if(h<10) printf("0"); printf("%d:",h); if(m<10) printf("0"); printf("%d:",m); if(s<10) printf("0"); printf("%d\n",s); return 0; }
原文地址:https://www.cnblogs.com/QRain/p/12240813.html
时间: 2024-11-05 10:25:19