結果

問題 No.2721 "Don't say N" Game
ユーザー yu_w(ゆ)yu_w(ゆ)
提出日時 2024-04-12 21:25:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 68 ms / 2,000 ms
コード長 319 bytes
コンパイル時間 194 ms
コンパイル使用メモリ 82,068 KB
実行使用メモリ 70,420 KB
最終ジャッジ日時 2024-04-12 21:25:36
合計ジャッジ時間 1,431 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,216 KB
testcase_01 AC 62 ms
66,432 KB
testcase_02 AC 68 ms
70,420 KB
testcase_03 AC 59 ms
66,240 KB
testcase_04 AC 55 ms
65,060 KB
testcase_05 AC 58 ms
66,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

for _ in range(int(input())):
    N=int(input())
    s = set()
    num = 1
    for i in range(1,N+1):
        if i*i > N:
            break
        elif i*i == N:
            num += 1
        else:
            if N%i == 0:
                num += 2
    
    if num%2 == 0:
        print("P")
    else:
        print("K")
0