結果
| 問題 | No.2725 Coprime Game 2 |
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2024-04-12 23:04:16 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 2,000 ms |
| コード長 | 518 bytes |
| コンパイル時間 | 2,879 ms |
| コンパイル使用メモリ | 243,540 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-02 23:43:32 |
| 合計ジャッジ時間 | 3,825 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 8 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int tt;
cin >> tt;
constexpr unsigned char pe[] = {2,3,4,5,7,8,9,11,13,16,17,19,23,25,27,29,31,32,37,41,43,47,49,53};
constexpr bool res[] = {1,1,0,1,1,0,0,1,1,0,1,1,1,0,0,1,1,0,1,1,1,1,0,1};
while (tt--) {
unsigned long long n;
cin >> n;
if (n == 2) {
cout << "P\n";
} else {
int i = 0;
while (n % pe[i] == 0) i++;
cout << "PK"[res[i]] << '\n';
}
}
}
Kude