1026 程序运行时间
水题。
#include<iostream> #include<cmath> using namespace std; int main() { int c1,c2; cin>>c1>>c2; int t = round((c2-c1)/100.0);//不足 1 秒的时间四舍五入到秒 int h = t/3600;//时 int m = t%3600/60;//分 int s = t%60;//秒 printf("%02d:%02d:%02d",h,m,s); return 0; }


浙公网安备 33010602011771号