QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#30601 | #973. Composite Sequence | wh_ZH# | WA | 3ms | 3792kb | C++ | 330b | 2022-04-30 13:09:24 | 2022-04-30 13:09:26 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int n,x,f;
int main()
{
scanf("%d",&n);
if(n>=2)
{
for(int i=1;i<=n;i++) scanf("%d",&x);
printf("Yes\n");
return 0;
}
scanf("%d",&x);
for(int i=2;i<=(int)sqrt(x)+1;i++)
{
if(x%i==0) f=1;
}
if(f) printf("Yes\n");
else printf("No\n");
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 3ms
memory: 3728kb
input:
2 5 7
output:
Yes
result:
ok "Yes"
Test #2:
score: 0
Accepted
time: 3ms
memory: 3712kb
input:
1 97
output:
No
result:
ok "No"
Test #3:
score: 0
Accepted
time: 1ms
memory: 3576kb
input:
1 97
output:
No
result:
ok "No"
Test #4:
score: -100
Wrong Answer
time: 3ms
memory: 3792kb
input:
3 1 1 1
output:
Yes
result:
wrong answer 1st words differ - expected: 'No', found: 'Yes'