QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#362721 | #8508. DiviDuelo | ucup-team3215# | WA | 1ms | 3572kb | C++20 | 313b | 2024-03-23 16:53:00 | 2024-03-23 16:53:00 |
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) while (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: 3540kb
input:
10
output:
Y
result:
ok "Y"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
9
output:
N
result:
ok "N"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3524kb
input:
1
output:
N
result:
ok "N"
Test #4:
score: -100
Wrong Answer
time: 1ms
memory: 3548kb
input:
549755813888
output:
N
result:
wrong answer 1st words differ - expected: 'Y', found: 'N'