結果

問題 No.2721 "Don't say N" Game
コンテスト
ユーザー MasKoaTS
提出日時 2023-09-28 18:04:34
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 210 ms / 2,000 ms
+ 543µs
コード長 223 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 257 ms
コンパイル使用メモリ 95,856 KB
実行使用メモリ 256,896 KB
最終ジャッジ日時 2026-08-24 12:16:28
合計ジャッジ時間 2,954 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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