結果

問題 No.2721 "Don't say N" Game
ユーザー 👑 rin204rin204
提出日時 2024-04-12 22:42:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 253 bytes
コンパイル時間 496 ms
コンパイル使用メモリ 82,824 KB
実行使用メモリ 65,872 KB
最終ジャッジ日時 2024-04-12 22:42:46
合計ジャッジ時間 1,659 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,240 KB
testcase_01 AC 59 ms
65,844 KB
testcase_02 AC 59 ms
65,872 KB
testcase_03 AC 61 ms
65,788 KB
testcase_04 AC 49 ms
62,044 KB
testcase_05 AC 60 ms
65,560 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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