Ankit_132

A

Jun 12th, 2024
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int t;
  6.     cin>>t;
  7.    
  8.     while(t--){
  9.         long long n, k;
  10.         cin >> n >> k;
  11.        
  12.         if (k * (k + 1) / 2 + k - 1 <= n)
  13.             cout<<"YES\n";
  14.         else
  15.             cout<<"NO\n";
  16.     }
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment