zltzlt 发表于 2020-1-1 21:40:52

洛谷题目 P1425

// https://www.luogu.com.cn/problem/P1425

#include <iostream>
using namespace std;

int main() {
        int a, b, c, d, h, m;
        cin >> a >> b >> c >> d;
        h = c - a;
        m = d - b;
        if (m < 0) {
                m += 60;
                h -= 1;
        }
        cout << h << " " << m;
        return 0;
}
页: [1]
查看完整版本: 洛谷题目 P1425