Today due to a power outage there may be disruptions in the work of Codeforces and Polygon. Please do not plan any important events during this time. If there are details or the exact time, we will definitely publish them. Estimated time of maintenance: from 3 Aug, 14:30 (UTC) to 3 Aug, 18:00 (UTC). ×

 
 
 
 
General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
119084144 Practice:
Bardock_
1538D - 25 GNU C++17 Accepted 1544 ms 8 KB 2021-06-10 20:46:10 2021-06-11 10:22:54
 
 
→ Source
#include <bits/stdc++.h>
using namespace std;
#define ll long long
inline ll getPf(int x){
    ll ans=0;
    ll n=x;
    for(int i=2; i * i <= x; i++){
        
            while(x % i == 0){
                x/=i;
                ans++;
            }
        
    }
    if(x>1)ans++;
    return ans;
}

int main(){
  int t;
  cin >> t;
  for (int i = 0; i < t; i++){
    int a, b, k;
    cin >> a >> b >> k;
    if (k == 1&&a==b){
        cout << "No" << endl;
        continue;
    } else {
        int pp=(a%b!=0)+(b%a!=0);
        if(k<pp){
            cout<<"No"<<endl;
            continue;
        }
      int cnt = 0;
      cnt=getPf(a)+getPf(b);
      if (k <= cnt){
        cout << "Yes" << endl;
      } else {
        cout << "No" << endl;
      }
    }
  }
}
 
 
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details