Guest User

STRNO

a guest
Apr 13th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #define ll long long
  2. #include <bits/stdc++.h>
  3. using namespace std;
  4. int main()
  5. {
  6.     int t;
  7.     cin>>t;
  8.     while(t--)
  9.     {
  10.     ll x,k;
  11.     cin>>x>>k;
  12.     int count=0;
  13.     for(int i=2;i<=sqrt(x);i++)
  14.     {
  15.         while(x%i==0)
  16.         {
  17.             x=x/i;
  18.             count++;
  19.         }
  20.  
  21.  
  22.     }
  23.     if(x>2)
  24.         count++;
  25.     if(count>=k)
  26.     {
  27.         cout<<"1"<<endl;
  28.     }
  29.     else
  30.         cout<<"0"<<endl;
  31.     }
  32.  
  33.     return 0;
  34. }
Add Comment
Please, Sign In to add comment