結果
| 問題 | No.2074 Product is Square ? |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-09-16 22:27:48 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 480 bytes |
| 記録 | |
| コンパイル時間 | 69 ms |
| コンパイル使用メモリ | 83,132 KB |
| 実行使用メモリ | 85,640 KB |
| 最終ジャッジ日時 | 2026-10-05 18:36:53 |
| 合計ジャッジ時間 | 6,244 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | TLE * 1 -- * 32 |
ソースコード
import math
from queue import Queue
def solve() :
N = int(input())
A = list(map(int, input().split()))
que = Queue()
for a in A :
que.put(a)
for i in range(N-1) :
a = que.get()
b = que.get()
que.put(a * b)
ret = que.get()
pk = math.sqrt(ret)
pk -= 5
while pk * pk < ret :
pk += 1
if pk * pk == ret :
print("Yes")
else :
print("No")
T = int(input())
for i in range(T) :
solve()