結果

問題 No.2721 "Don't say N" Game
ユーザー ShirotsumeShirotsume
提出日時 2024-04-12 21:21:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 67 ms / 2,000 ms
コード長 442 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 82,288 KB
実行使用メモリ 67,256 KB
最終ジャッジ日時 2024-04-12 21:21:35
合計ジャッジ時間 1,133 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
55,176 KB
testcase_01 AC 62 ms
66,780 KB
testcase_02 AC 60 ms
65,816 KB
testcase_03 AC 67 ms
67,256 KB
testcase_04 AC 55 ms
64,820 KB
testcase_05 AC 62 ms
67,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, time, random
from collections import deque, Counter, defaultdict
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 61 - 1
mod = 998244353

def solve():
    n = ii()
    cnt = 0
    for i in range(1, n + 1):
        if n % i == 0:
            cnt += 1
    print('K' if cnt % 2 == 0 else 'P')
    
    
for _ in range(ii()):
    solve()
0