1 条题解
-
0
C++ :
#include<iostream> using namespace std; void output(int h, int m) { if (h < 10) cout << '0'; cout << h << ':'; if (m < 10) cout << '0'; cout << m << endl; } int main() { int h1, h2, m1, m2; char c; while (cin >> h1 >> c >> m1) { cin >> h2 >> c >> m2; m1 += 60 - m2; h1 += 23 - h2; if (m1 >= 60) { h1++; m1 -= 60; } if (h1 >= 24) h1 -= 24; output(h1, m1); } return 0; }
- 1
信息
- ID
- 3382
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者