結果

問題 No.2721 "Don't say N" Game
ユーザー MasKoaTS
提出日時 2023-09-28 18:04:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 290 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 217 ms
コンパイル使用メモリ 82,700 KB
実行使用メモリ 235,104 KB
最終ジャッジ日時 2024-07-26 15:12:19
合計ジャッジ時間 2,705 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

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