結果
問題 | No.2074 Product is Square ? |
ユーザー |
|
提出日時 | 2022-09-16 22:27:48 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 480 bytes |
コンパイル時間 | 1,393 ms |
コンパイル使用メモリ | 82,120 KB |
実行使用メモリ | 156,540 KB |
最終ジャッジ日時 | 2024-12-21 21:43:35 |
合計ジャッジ時間 | 22,737 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 3 RE * 24 TLE * 6 |
ソースコード
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()