SHARE
TWEET

codechef - distribute apples

jakaria_hossain Aug 3rd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     int t;
  6.     cin>>t;
  7.     while(t--)
  8.     {
  9.         long long n,k,ans;
  10.         cin>>n>>k;
  11.         ans=n/k;
  12.         if(k==1)cout<<"NO"<<endl;
  13.         else
  14.         {
  15.             if(ans%k==0)cout<<"NO"<<endl;
  16.             else cout<<"YES"<<endl;
  17.         }
  18.  
  19.     }
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top