結果
| 問題 | No.2721 "Don't say N" Game |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-27 21:33:03 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 5 ms / 2,000 ms |
| コード長 | 371 bytes |
| 記録 | |
| コンパイル時間 | 3,255 ms |
| コンパイル使用メモリ | 275,776 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-11-27 21:33:07 |
| 合計ジャッジ時間 | 4,187 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 5 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, s, e) for (int i = (int)(s); i < (int)(e); ++i)
int main() {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
int T;
cin >> T;
for (;T--;) {
int N;
cin >> N;
int divs = 0;
rep(i, 1, N + 1) if (N % i == 0) ++divs;
cout << (divs % 2 == 0 ? 'K' : 'P') << '\n';
}
}