Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

 
 
 
 
General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
119065848 Contestant:
oppoman
1538D - 12 C++17 (GCC 7-32) Wrong answer on test 2 15 ms 4 KB 2021-06-10 19:40:00 2021-06-10 19:40:00
→ Source
//Jai Shri Ram
//Jai Shri Krishna

#include<bits/stdc++.h>
using namespace std;

#define int long long
typedef vector<int> vi ;
typedef map<int,int> mii;
typedef pair<int,int> pii;
#define pb push_back
#define all(V) V.begin(),V.end()
#define uniq(v)   (v).erase(unique(all(v)),(v).end())
#define ub upper_bound
#define lb lower_bound
#define ff first
#define ss second
#define fill(baxq,I)   (memset(baxq,I,sizeof(baxq)))
#define sz(x) (int)((x).size())
#define endl  "\n"


const int32_t mod=1e9+7;
const long long inf=1e18;

int pf(int n)
{
   int cnt=0;

   while (n % 2 == 0)
    {
        cnt++;
        n = n/2;
    }
 
    
    for (int i = 3; i <= sqrt(n); i = i + 2)
    {
        
        while (n % i == 0)
        {
            cnt++;
            n = n/i;
        }
    }
 
 
    if (n > 2)
       cnt++;

    return cnt;
}

void solve()
   {
     int a,b,k;
     cin>>a>>b>>k;

     if(k==1 and a==b)
     {
      cout<<"NO\n"; return;
     }

     //int x=__gcd(a,b);

     int x=pf(a)+pf(b);

     if(x>=k)cout<<"YES\n";
     else cout<<"NO\n";










   }

int32_t main()
{   
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);


    int tcs=1;
    cin>>tcs;
    while(tcs--)
       {    
            solve() ;
       }

}
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details