結果

問題 No.2721 "Don't say N" Game
ユーザー n_nan_na
提出日時 2024-04-12 23:45:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 70 ms / 2,000 ms
コード長 399 bytes
コンパイル時間 361 ms
コンパイル使用メモリ 82,292 KB
実行使用メモリ 69,252 KB
最終ジャッジ日時 2024-04-12 23:45:11
合計ジャッジ時間 1,533 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,068 KB
testcase_01 AC 66 ms
68,904 KB
testcase_02 AC 70 ms
69,252 KB
testcase_03 AC 67 ms
69,180 KB
testcase_04 AC 54 ms
63,716 KB
testcase_05 AC 69 ms
68,316 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def divisor(N):
    res = []
    for i in range(1, N+1):
        if i*i > N:
            break  
        if N%i != 0:
            continue
        res.append(i)
        if N//i != i:
            res.append(N//i)

    res.sort()
    return res


T = int(input())
for _ in range(T):
    N = int(input())
    c = len(divisor(N))
    if c%2 == 0:
        print("K")
    else:
        print("P")
        
0