QOJ.ac
QOJ
ID | Submission ID | Problem | Hacker | Owner | Result | Submit time | Judge time |
---|---|---|---|---|---|---|---|
#845 | #570208 | #9299. ABC Conjecture | ship2077 | rotcar07 | Success! | 2024-09-19 19:40:04 | 2024-09-19 19:40:04 |
Details
Extra Test:
Wrong Answer
time: 0ms
memory: 3596kb
input:
1 1000810199515523
output:
no
result:
wrong answer expected YES, found NO [1st token]
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#570208 | #9299. ABC Conjecture | rotcar07# | WA | 1ms | 3752kb | C++20 | 469b | 2024-09-17 14:40:42 | 2024-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");
}
}