QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#389095 | #8508. DiviDuelo | ucup-team1716# | WA | 2ms | 3736kb | C++20 | 427b | 2024-04-14 02:17:12 | 2024-04-14 02:17:13 |
Judging History
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: 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'