fork download
  1.  
  2. #include <bits/stdc++.h>
  3. using namespace std;
  4.  
  5. int main() {
  6. // your code goes here
  7. int t,X,Y,c=0;
  8. cin>>t;
  9. while(t--)
  10. {
  11. c=0;
  12. cin>>X>>Y;
  13. while(X<Y){
  14.  
  15. X=X+8;
  16. c++;
  17. }
  18.  
  19. cout<<c<<'\n';
  20.  
  21.  
  22. }
  23.  
  24. return 0;
  25. }
Success #stdin #stdout 0.01s 5552KB
stdin
4
10 10
10 17
10 18
10 19
stdout
0
1
1
2