QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#362721#8508. DiviDueloucup-team3215#WA 1ms3572kbC++20313b2024-03-23 16:53:002024-03-23 16:53:00

Judging History

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

  • [2024-03-23 16:53:00]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3572kb
  • [2024-03-23 16:53:00]
  • 提交

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'