QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#389095#8508. DiviDueloucup-team1716#WA 2ms3736kbC++20427b2024-04-14 02:17:122024-04-14 02:17:13

Judging History

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

  • [2024-04-14 02:17:13]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3736kb
  • [2024-04-14 02:17:12]
  • 提交

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";
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3660kb

input:

10

output:

Y

result:

ok "Y"

Test #2:

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

input:

9

output:

N

result:

ok "N"

Test #3:

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

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: 3736kb

input:

274877906944

output:

Y

result:

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