3 条题解

  • 0
    @ 2023-11-25 16:51:39

    这题只是考符号而已,没有太大的难度

    /求商 %求余

    就是这样写的

    #include<bits/stdc++.h>
    using namespace std;
    
    int a,b,c,d;//经典ABCD
    
    int main () {
    cin >> a >> b;//输入
    c = a / b;//商
    d = a % b;//余
    cout << c << " " << d;//记得加空格
    return 0;
    }
    
    • 0
      @ 2023-10-28 17:04:30
      #include <iostream>
      using namespace std;
      int main()
      {
          int a,b;
          cin>>a>>b;
          int d = a % b;
          int c = (a-d)/b;
          cout<<c<<" "<<d<<endl;
          return 0;
      }
      
      • 0
        @ 2023-6-28 12:35:39

        #include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d; cin>>a>>b; c=a/b; d=a-b*c; cout<<c<<' '<<d; return 0; }

        • 1

        信息

        ID
        10
        时间
        1000ms
        内存
        128MiB
        难度
        1
        标签
        (无)
        递交数
        34
        已通过
        27
        上传者