fork(1) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6. int b, c;
  7. cin >> b >> c;
  8. while (c) {
  9. cout << b / (c - b) + 1 << endl;
  10. cin >> b >> c;
  11. }
  12. return 0;
  13. }
Success #stdin #stdout 0s 15232KB
stdin
5 10
100 1000
13 18
0 0
stdout
2
1
3