4 条题解

  • 1
    @ 2025-1-20 22:24:24

    #include #include using namespace std;

    int main() { int a, b; cin >> a >> b; int c = (a + b) / 2; cout << abs(c - a) << " " << abs(c - b) << endl; return 0; } 各位仁兄我知道你们困到这道题了 如果实在不知道咋写就按照我的写吧 awa

    • 1
      @ 2023-7-27 18:01:29

      #include #include using namespace std; int main() { int a,b,c,d; scanf("%d %d",&a,&b); c=(a+b)/2; d=abs(1.0*(c-a)); printf ("%d\n",d); return 0; }

      • 1
        @ 2023-7-25 16:43:07

        #include using namespace std; int main() { int a,b,c; cin>>a>>b; c=(a+b)/2; if(a>b) cout<<c-b; else cout<<c-a; return 0; }

        • -1
          @ 2025-1-26 9:49:41

          #include using namespace std; int main() { int a,b; cin>>a>>b; int c=(a+b)/2; if(a>b) cout<<c-b; else cout<<c-a; return 0; }

          • 1

          信息

          ID
          304
          时间
          1000ms
          内存
          256MiB
          难度
          5
          标签
          (无)
          递交数
          468
          已通过
          193
          上传者