QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#362682 | #8508. DiviDuelo | ucup-team3215# | WA | 0ms | 3744kb | C++20 | 310b | 2024-03-23 16:40:26 | 2024-03-23 16:40:27 |
Judging History
answer
#include <iostream>
#include <vector>
using namespace std;
int main() {
int64_t n; cin >> n;
vector<int64_t> v;
for (int64_t a = 2; a * a <= n; ++a) if (n % a == 0) v.push_back(a), n /= a;
if (n > 1) v.push_back(n);
cout << (v.size() == 2 && v[0] != v[1] || v.size() == 1? "Y": "N");
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3592kb
input:
10
output:
Y
result:
ok "Y"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
9
output:
N
result:
ok "N"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
1
output:
N
result:
ok "N"
Test #4:
score: -100
Wrong Answer
time: 0ms
memory: 3744kb
input:
549755813888
output:
N
result:
wrong answer 1st words differ - expected: 'Y', found: 'N'