結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
51,992 KB
testcase_01 AC 71 ms
68,228 KB
testcase_02 AC 73 ms
69,280 KB
testcase_03 AC 68 ms
68,228 KB
testcase_04 AC 56 ms
64,552 KB
testcase_05 AC 68 ms
68,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def gen_divisors(n):
    a = []
    for i in range(1,n+1):
        if i*i>n: break
        if n%i==0:
            a.append(i)
            if i*i<n: a.append(int(n/i))
    #a.sort()
    return a
T=int(input())
for _ in range(T):
    N=int(input())
    A=gen_divisors(N)
    if len(A)%2==0:print("K")
    else:print("P")
0