2 条题解

  • 1
    @ 2025-7-16 17:20:46

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

    int a[15]; int b[15];

    int main() { int x=0, y=0, z=0; for (int i = 1; i <= 10; i++) { cin >> a[i]; } for (int i = 1; i <= 10; i++) { cin >> b[i]; } for (int i = 1; i <= 10; i++) { if (a[i] > b[i]) { x++; } else if (a[i] == b[i]) { y++; } else { z++; } } cout << x << ' ' << y << ' ' << z << endl; if (x > z) { cout << "a>b"; } else if (x < z) { cout << "a<b"; } else { cout << "a=b"; } return 0; }

    • 0
      @ 2025-7-16 17:19:40

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

      int a[15]; int b[15];

      int main() { int x = 0, y = 0, z = 0; for (int i = 1; i <= 10; i++) { cin >> a[i]; } for (int i = 1; i <= 10; i++) { cin >> b[i]; } for (int i = 1; i <= 10; i++) { if (a[i] > b[i]) { x++; } else if (a[i] == b[i]) { y++; } else { z++; } } cout << x << ' ' << y << ' ' << z << endl; if (x > z) { cout << "a>b"; } else if (x < z) { cout << "a<b"; } else { cout << "a=b"; } return 0; }

      • 1

      信息

      ID
      350
      时间
      1000ms
      内存
      64MiB
      难度
      4
      标签
      递交数
      76
      已通过
      35
      上传者