結果
問題 | No.2725 Coprime Game 2 |
ユーザー | MasKoaTS |
提出日時 | 2024-03-29 15:32:07 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 144 ms / 2,000 ms |
コード長 | 302 bytes |
コンパイル時間 | 420 ms |
コンパイル使用メモリ | 81,572 KB |
実行使用メモリ | 76,968 KB |
最終ジャッジ日時 | 2024-03-29 15:32:10 |
合計ジャッジ時間 | 3,254 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 36 ms
53,588 KB |
testcase_01 | AC | 40 ms
53,460 KB |
testcase_02 | AC | 36 ms
53,588 KB |
testcase_03 | AC | 135 ms
76,912 KB |
testcase_04 | AC | 144 ms
76,920 KB |
testcase_05 | AC | 140 ms
76,968 KB |
testcase_06 | AC | 131 ms
76,964 KB |
testcase_07 | AC | 110 ms
76,500 KB |
testcase_08 | AC | 132 ms
76,908 KB |
ソースコード
import sys from math import gcd input = sys.stdin.readline def solve(n): for i in range(2, n): if(n % i == 0): continue if(gcd(i, n) == 1): return 'K' break return 'P' t = int(input()) for _ in [0] * t: n = int(input()) print(solve(n))