QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#362682#8508. DiviDueloucup-team3215#WA 0ms3744kbC++20310b2024-03-23 16:40:262024-03-23 16:40:27

Judging History

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

  • [2024-03-23 16:40:27]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3744kb
  • [2024-03-23 16:40:26]
  • 提交

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");
}

详细

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'