結果
| 問題 |
No.2725 Coprime Game 2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-12 22:54:49 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 332 ms / 2,000 ms |
| コード長 | 262 bytes |
| コンパイル時間 | 161 ms |
| コンパイル使用メモリ | 82,336 KB |
| 実行使用メモリ | 77,056 KB |
| 最終ジャッジ日時 | 2024-10-02 23:40:26 |
| 合計ジャッジ時間 | 2,868 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 8 |
ソースコード
from math import gcd
def solve():
n = int(input())
if n == 2:
return False
x = 2
while n % x == 0:
x += 1
return gcd(n, x) == 1
for _ in range(int(input())):
if solve():
print("K")
else:
print("P")