QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#30603#973. Composite Sequencewh_ZH#WA 3ms3720kbC++339b2022-04-30 13:10:432022-04-30 13:10:45

Judging History

This is the latest submission verdict.

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-04-30 13:10:45]
  • Judged
  • Verdict: WA
  • Time: 3ms
  • Memory: 3720kb
  • [2022-04-30 13:10:43]
  • Submitted

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<=min((int)sqrt(x)+1,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: 3712kb

input:

2
5 7

output:

Yes

result:

ok "Yes"

Test #2:

score: 0
Accepted
time: 2ms
memory: 3660kb

input:

1
97

output:

No

result:

ok "No"

Test #3:

score: 0
Accepted
time: 2ms
memory: 3720kb

input:

1
97

output:

No

result:

ok "No"

Test #4:

score: -100
Wrong Answer
time: 2ms
memory: 3632kb

input:

3
1 1 1

output:

Yes

result:

wrong answer 1st words differ - expected: 'No', found: 'Yes'