T3000

Untitled

Jan 4th, 2022
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include<iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6.     int a,b,c,d;
  7.     cin>>a;
  8.     while(a>0){
  9.      cin>>b;
  10.      c=0;
  11.       for(int i=400;i<=b;i+=400){
  12.        c+=1;
  13.        d=i;
  14.       }
  15.       if(b>d){
  16.           c+=1;
  17.       }
  18.       if(b<400){
  19.           c+=1;
  20.  
  21.       }
  22.       cout<<c<<endl;
  23.       a-=1;
  24.  
  25.     }
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment