QOJ.ac
QOJ
ID | Submission ID | Problem | Hacker | Owner | Result | Submit time | Judge time |
---|---|---|---|---|---|---|---|
#844 | #570208 | #9299. ABC Conjecture | ship2077 | rotcar07 | Failed. | 2024-09-19 19:39:30 | 2024-09-19 19:39:30 |
Details
Extra Test:
Invalid Input
input:
1 1000810199515523
output:
result:
FAIL Expected EOLN (stdin, line 1)
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");
}
}