結果

問題 No.2725 Coprime Game 2
ユーザー nikoro256nikoro256
提出日時 2024-04-13 00:11:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 473 ms / 2,000 ms
コード長 236 bytes
コンパイル時間 453 ms
コンパイル使用メモリ 82,096 KB
実行使用メモリ 77,060 KB
最終ジャッジ日時 2024-04-13 00:11:06
合計ジャッジ時間 3,725 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,068 KB
testcase_01 AC 37 ms
53,012 KB
testcase_02 AC 39 ms
52,924 KB
testcase_03 AC 279 ms
76,384 KB
testcase_04 AC 473 ms
76,204 KB
testcase_05 AC 312 ms
76,800 KB
testcase_06 AC 308 ms
77,060 KB
testcase_07 AC 216 ms
76,272 KB
testcase_08 AC 318 ms
76,284 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
T=int(input())
for _ in range(T):
    N=int(input())
    for i in range(1,N+1):
        if N%i==0:
            continue
        else:
            break
    if math.gcd(N,i)==1:
        print('K')
    else:
        print('P')
0