結果
問題 | No.2725 Coprime Game 2 |
ユーザー |
![]() |
提出日時 | 2024-04-12 23:23:56 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 341 ms / 2,000 ms |
コード長 | 352 bytes |
コンパイル時間 | 313 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 76,852 KB |
最終ジャッジ日時 | 2024-10-02 23:50:09 |
合計ジャッジ時間 | 3,052 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 8 |
ソースコード
import math for _ in range(int(input())): N=int(input()) Ncopy = N LoseNum = 2 for i in range(2,min(N,1000)): isLosenum = True if N%i == 0: isLosenum = False if isLosenum: LoseNum = i break if math.gcd(Ncopy,LoseNum) != 1: print("P") else: print("K")