結果

問題 No.2721 "Don't say N" Game
ユーザー MasKoaTSMasKoaTS
提出日時 2023-09-28 18:04:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 267 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 249,664 KB
最終ジャッジ日時 2023-10-05 22:29:12
合計ジャッジ時間 2,624 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 258 ms
248,812 KB
testcase_01 AC 267 ms
249,000 KB
testcase_02 AC 257 ms
249,160 KB
testcase_03 AC 258 ms
249,008 KB
testcase_04 AC 256 ms
249,124 KB
testcase_05 AC 256 ms
249,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline


query = [int(input()) for _ in [0] * int(input())]

st = set([i ** 2 for i in range(1, 10 ** 6 + 1)])
for n in query:
    if(n in st):
        print('P')
    else:
        print('K')
0