QOJ.ac

QOJ

ID提交记录ID题目HackerOwner结果提交时间测评时间
#844#570208#9299. ABC Conjectureship2077rotcar07Failed.2024-09-19 19:39:302024-09-19 19:39:30

详细

Extra Test:

Invalid Input

input:

1
1000810199515523

output:


result:

FAIL Expected EOLN (stdin, line 1)

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#570208#9299. ABC Conjecturerotcar07#WA 1ms3752kbC++20469b2024-09-17 14:40:422024-10-14 07:37:33

answer

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

int main(){
    int t;cin>>t;
    while(t--){
        long long c;cin>>c;
        bool f=0;
        for(int i=2;i<=1e4+5;i++){
            if(c%i==0){
                if(c%(i*i)==0) f=1;
                else c/=i;
            }
        }
        if(!f&&c>1){
            int w=sqrtl(c);
            // cout<<c<<' '<<w<<'\n';
            if(w*1ll*w==c) f=1;
        }
        puts(f?"yes":"no");
    }
}