4 条题解

  • 0
    @ 2026-9-12 15:17:48

    ,,c++ ==#include <bits/stdc++.h> using namespace std;

    struct teto { int ch, cm; };

    struct miku { int zh, zm; };

    int main() { teto a[15]; miku b[15]; cin >> a[1].ch >> a[1].cm; cin >> b[1].zh >> b[1].zm; if (b[1].zm - a[1].cm < 0) { cout << b[1].zh - a[1].ch - 1 << " " << b[1].zm - a[1].cm + 60; } else { cout << b[1].zh - a[1].ch << " " << b[1].zm - a[1].cm; }

    return 0; }

    • 0
      @ 2026-9-10 14:05:23
      #include <bits/stdc++.h>
      using namespace std;
      int a, b, c, d;
      int n, m;
      
      int main() {
      	cin >> a >> b >> c >> d;
      	if (b <= d) {
      		m = d - b;
      	} else {
      		d += 60;
      		m = d - b;
      		c--;
      	}
      	n = c - a;
      	cout << n << " " << m;
      	return 0;
      }
      
      • 0
        @ 2026-9-6 19:23:57

        #include <bits/stdc++.h> using namespace std;

        struct teto { int ch, cm; };

        struct miku { int zh, zm; };

        int main() { teto a[15]; miku b[15]; cin >> a[1].ch >> a[1].cm; cin >> b[1].zh >> b[1].zm; if (b[1].zm - a[1].cm < 0) { cout << b[1].zh - a[1].ch - 1 << " " << b[1].zm - a[1].cm + 60; } else { cout << b[1].zh - a[1].ch << " " << b[1].zm - a[1].cm; }

        return 0;
        

        }

        • -5
          @ 2026-8-7 16:14:43
          #include <iostream>
          using namespace std;
          
          int main() {
          	int a, b, c, d;
          	cin >> a >> b >> c >> d;
          	int x = c - a, y = d - b;
          	if (y < 0) {
          		x--;
          		y += 60;
          	}
          	cout << x << " " << y;
          	return 0;
          }
          
          
          
        • 1

        信息

        ID
        5539
        时间
        1000ms
        内存
        125MiB
        难度
        1
        标签
        递交数
        103
        已通过
        37
        上传者