結果

問題 No.2721 "Don't say N" Game
ユーザー detteiuudetteiuu
提出日時 2024-04-12 21:23:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 355 bytes
コンパイル時間 246 ms
コンパイル使用メモリ 82,448 KB
実行使用メモリ 70,728 KB
最終ジャッジ日時 2024-04-12 21:23:54
合計ジャッジ時間 1,340 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,536 KB
testcase_01 AC 68 ms
68,744 KB
testcase_02 AC 70 ms
70,728 KB
testcase_03 AC 70 ms
69,768 KB
testcase_04 AC 55 ms
65,112 KB
testcase_05 AC 79 ms
69,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

def divisor(n):
    ans = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            ans.append(i)
            if i*i != n:
                ans.append(n//i)
    return sorted(ans)

ans = []
for i in range(T):
    N = int(input())
    D = divisor(N)
    if len(D) % 2 == 1:
        print("P")
    else:
        print("K")
0