标签:运行 include def else 相同 code 程序 return 运行时
#include <cstdio>
#define CLK_TCK 100
int main() {
int C1, C2, C3;//C3为两个时间之差
scanf("%d%d", &C1, &C2);
//if(C1 < C2) return;
C3 = C2 - C1;
if(C3 < 0) return 0;//两次获得的时钟打点数肯定不相同,即C1<C2
if(C3 % CLK_TCK >= 50) {
C3 = C3 / CLK_TCK + 1;
} else {
C3 = C3 / CLK_TCK;
}
printf("%02d:%02d:%02d\n", C3/3600, C3%3600/60, C3 % 60);
return 0;
}
标签:运行 include def else 相同 code 程序 return 运行时
原文地址:https://www.cnblogs.com/isChenJY/p/11185130.html