Codeforces 833A The Meaningless Game

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Codeforces 833A The Meaningless Game相关的知识,希望对你有一定的参考价值。

http://codeforces.com/problemset/problem/833/A

a*b开三方,检查是否是整数且a,b能整除它就好。

#include<cstdio> 
#include<cmath>  
using namespace std;   
#define ll long long
int T;  
ll a,b;
int main(){  
    scanf("%d",&T);
    while(T--){  
        scanf("%lld%lld",&a,&b);  
        ll c=a*b;  
        c=round(pow((double)c,1.0/3));  
        if(c*c*c!=a*b||a%c||b%c) printf("No\n");  
        else printf("Yes\n");  
    }    
    return 0;  
}

 

以上是关于Codeforces 833A The Meaningless Game的主要内容,如果未能解决你的问题,请参考以下文章

CF833A The Meaningless Game 鎬濈淮

CodeForces 622B The Time

Educational Codeforces Round 7 F - The Sum of the k-th Powers 拉格朗日插值

CodeForces 625B War of the Corporations

CodeForces 625A Guest From the Past

CodeForces 618B Guess the Permutation