1026 程序运行时间 (15 分)

时间:2021-02-15 12:25:04   收藏:0   阅读:0

水题~,就简单转换下时间。

int a,b;

int main()
{
    cin>>a>>b;

    int tim=round((b-a)/100.0);
    int hh=tim/3600,mm=tim%3600/60,ss=tim%3600%60;
    printf("%02d:%02d:%02d\n",hh,mm,ss);
    //system("pause");
    return 0;
}
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!