3 条题解

  • 3
    @ 2023-3-29 21:16:53
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int n, a;
        cin >> n >> a;
        if(n % a == 0)
        {
            cout << n / a;
        }
        else
        {
            cout << n / a + 1;
        }
        return 0;
    }
    
    • 1
      @ 2023-10-13 0:00:52
      #include<bits/stdc++.h>
      using namespace std;
      int n,m;
      int main()
      {
      
          cin>>n>>m;
          if(n%m!=1)
          {
              cout<<n/m;
          }
          else
          {
              cout<<n/m+1;
          }
          return 0;
      }
      
      
      • 1
        @ 2023-4-6 19:56:48
        #include<bits/stdc++.h>
        using namespace std;
        int main()
        {
            int x,y;
            cin>>x>>y;
            if (x%y==0)
                cout<<x/y;
            else
                cout<<x/y+1;
            return 0;
        }
        • 1

        【入门】计算考试需要的教室

        信息

        ID
        645
        时间
        1000ms
        内存
        16MiB
        难度
        3
        标签
        递交数
        153
        已通过
        86
        上传者