結果

問題 No.2074 Product is Square ?
コンテスト
ユーザー ecottea
提出日時 2022-09-16 22:47:45
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
RE  
実行時間 -
コード長 205 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 176 ms
コンパイル使用メモリ 84,864 KB
実行使用メモリ 69,632 KB
最終ジャッジ日時 2026-05-28 10:33:17
合計ジャッジ時間 4,762 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 3 RE * 30
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import math

t = int(input())

for _ in range(t):
    n = int(input())
    a = list(map(int, input().split()))

    p = math.prod(a)
    rt = round(math.sqrt(p))
    print("Yes" if rt * rt == p else "No")
0