【PAT】B1026 程序运行时间(15 分)

#include<cstdio>
#include<stdlib.h>
const int CLK_TCK=100;
int main(){
    int C1,C2;
    scanf("%d%d",&C1,&C2);
    int shi,fen,chamiao=(C2-C1)/100;
    shi=chamiao/3600;
    chamiao%=3600;
    fen=chamiao/60;
    chamiao=chamiao%60;
    if((C2-C1)%100>=50)chamiao++;
    printf("%02d:%02d:%02d",shi,fen,chamiao);
    return 0;
}

猜你喜欢

转载自www.cnblogs.com/hebust/p/9498078.html