結果

問題 No.2721 "Don't say N" Game
ユーザー rlangevinrlangevin
提出日時 2024-04-12 21:21:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 70 ms / 2,000 ms
コード長 315 bytes
コンパイル時間 270 ms
コンパイル使用メモリ 82,156 KB
実行使用メモリ 69,964 KB
最終ジャッジ日時 2024-04-12 21:21:34
合計ジャッジ時間 1,382 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,216 KB
testcase_01 AC 67 ms
69,236 KB
testcase_02 AC 70 ms
68,720 KB
testcase_03 AC 68 ms
69,964 KB
testcase_04 AC 57 ms
63,880 KB
testcase_05 AC 67 ms
68,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def div(n):
    if n <= 0:
        return []
    S = set()
    i = 1
    while i * i <= n:
        if n % i == 0:
            S.add(i)
            S.add(n//i)
        i += 1
    return sorted(list(S))


for i in range(int(input())):
    if len(div(int(input()))) % 2:
        print("P")
    else:
        print("K")
0