結果
| 問題 |
No.2725 Coprime Game 2
|
| コンテスト | |
| ユーザー |
yu_w(ゆ)
|
| 提出日時 | 2024-04-12 22:36:35 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 376 bytes |
| コンパイル時間 | 293 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 77,696 KB |
| 最終ジャッジ日時 | 2024-10-02 23:32:50 |
| 合計ジャッジ時間 | 2,812 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 1 WA * 6 RE * 1 |
ソースコード
import math
for _ in range(int(input())):
N=int(input())
Ncopy = N
isLosenum = 2
for i in range(2,N):
isLosenum = True
while N%i == 0:
isLosenum = False
N //= i
if isLosenum:
LoseNum = i
break
if math.gcd(Ncopy,LoseNum) != 1:
print("P")
else:
print("K")
yu_w(ゆ)