結果

問題 No.2721 "Don't say N" Game
コンテスト
ユーザー 👑 rin204
提出日時 2024-04-12 22:42:45
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 45 ms / 2,000 ms
+ 166µs
コード長 253 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 77 ms
コンパイル使用メモリ 81,024 KB
実行使用メモリ 67,200 KB
最終ジャッジ日時 2026-09-09 07:18:00
合計ジャッジ時間 1,382 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

def solve():
    n = int(input())
    sq = int(n**0.5)
    while sq * sq < n:
        sq += 1
    while sq * sq > n:
        sq -= 1
    return sq * sq == n


for _ in range(int(input())):
    if solve():
        print("P")
    else:
        print("K")
0