2 solutions

  • 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

      Information

      ID
      117
      Time
      1000ms
      Memory
      64MiB
      Difficulty
      3
      Tags
      # Submissions
      112
      Accepted
      63
      Uploaded By