結果
| 問題 | No.2725 Coprime Game 2 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-12 15:11:13 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 19 ms / 2,000 ms |
| + 411µs | |
| コード長 | 355 bytes |
| 記録 | |
| コンパイル時間 | 1,082 ms |
| コンパイル使用メモリ | 208,376 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-13 05:05:21 |
| 合計ジャッジ時間 | 2,779 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 8 |
ソースコード
#include <bits/stdc++.h>
using LL = long long;
const int N = 22;
const int MOD = 1e9 + 7;
LL n;
void solve() {
scanf("%lld", &n);
int m = 2;
while(m < n && n % m == 0)
++m;
putchar(std::__gcd(LL(m), n) == 1 ? 'K' : 'P');
putchar(10);
}
int main() {
int cases;
scanf("%d", &cases);
while(cases--)
solve();
return 0;
}