标签:lap 格式 include 程序 using 输出 整数 四舍五入 时钟
要求
样例
思路
程序
#include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
int n = ((b - a) + 50) / 100;
int hour = n / 3600;
n = n % 3600;
int minute = n / 60, second = n % 60;
printf("%02d:%02d:%02d", hour, minute, second);
return 0;
}
标签:lap 格式 include 程序 using 输出 整数 四舍五入 时钟
原文地址:https://www.cnblogs.com/cxc1357/p/13857245.html