标签:style class printf round logs code int define 整数
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
标签:style class printf round logs code int define 整数
原文地址:http://www.cnblogs.com/nzher/p/7424671.html