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