2 条题解

  • 0
    @ 2025-7-16 15:14:32

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

    int main() { int a, b, s = 0; cin >> a >> b; for (int i = 1; ; i++) {

    	if (b <= 0) {
    
    		break;
    	}
    	b = b - a;
    	s++;
    }
    cout << s;
    return 0;
    
    
    return 0;
    

    }

    • 0
      @ 2025-7-16 15:08:58

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

      int main() { int a, b, s = 0;; cin >> a >> b; for (int i = 1; ; i++) { if (b <= 0) { break; } b = b - a; s++; } cout << s; return 0; }

      • 1

      信息

      ID
      117
      时间
      1000ms
      内存
      64MiB
      难度
      4
      标签
      递交数
      396
      已通过
      187
      上传者