QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#389108#8508. DiviDueloucup-team1716#WA 2ms3672kbC++20427b2024-04-14 02:29:282024-04-14 02:29:29

Judging History

你现在查看的是最新测评结果

  • [2024-04-14 02:29:29]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3672kb
  • [2024-04-14 02:29:28]
  • 提交

answer

#include <bits/stdc++.h>
#define ll long long
#define pb push_back

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	ll n;
	cin >> n;

	ll s = round(sqrt(n));
	if(s * s == n)
    {
        bool x = false;
        for(ll i=2; i < s; i++) x |= (s%i==0);

        if(x) cout << "Y";
        else cout << "N";
    }
    else cout << "Y";
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3540kb

input:

10

output:

Y

result:

ok "Y"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

9

output:

N

result:

ok "N"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

1

output:

N

result:

ok "N"

Test #4:

score: 0
Accepted
time: 0ms
memory: 3672kb

input:

549755813888

output:

Y

result:

ok "Y"

Test #5:

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

input:

274877906944

output:

Y

result:

wrong answer 1st words differ - expected: 'N', found: 'Y'