Advertisement
Pridexs

Regional_Curitiba_Problema_A

Sep 17th, 2014
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdio>
  3. #include <cstdlib>
  4. #include <cstring>
  5. #include <cctype>
  6. #include <cmath>
  7. #include <algorithm>
  8. #include <bitset>
  9. #include <vector>
  10. #include <stack>
  11. #include <queue>
  12. #include <set>
  13. #include <map>
  14.  
  15. /*
  16. Team: BalΓ£o Vermelho
  17. */
  18.  
  19. int main() {
  20.  
  21.     int x,y;
  22.     int dif, cont;
  23.     while(scanf("%d %d", &x, &y) != EOF) {
  24.         dif = y-x;
  25.         cont = 1;
  26.         do {
  27.             cont++;
  28.         } while (cont * dif < y);
  29.         printf("%d\n", cont);
  30.     }
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement