結果
| 問題 | No.2721 "Don't say N" Game |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-15 09:36:51 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 418 bytes |
| 記録 | |
| コンパイル時間 | 1,265 ms |
| コンパイル使用メモリ | 217,532 KB |
| 実行使用メモリ | 9,972 KB |
| 最終ジャッジ日時 | 2026-07-04 12:01:39 |
| 合計ジャッジ時間 | 1,931 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 5 |
ソースコード
#include <bits/stdc++.h>
void solve() {
int N;
std::cin >> N;
std::set<int> divs;
for (int i = 1; i <= N; i++) {
if (N % i == 0) {
divs.insert(i);
divs.insert(N / i);
}
}
std::cout << (divs.size() % 2 == 0 ? "K" : "P") << '\n';
}
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int t;
std::cin >> t;
while (t--) {
solve();
}
return 0;
}