結果

問題 No.2074 Product is Square ?
ユーザー とりゐとりゐ
提出日時 2022-09-17 01:53:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 233 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 87,252 KB
実行使用メモリ 76,880 KB
最終ジャッジ日時 2023-08-23 17:23:08
合計ジャッジ時間 4,443 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,300 KB
testcase_01 AC 80 ms
76,176 KB
testcase_02 AC 81 ms
76,204 KB
testcase_03 AC 86 ms
76,200 KB
testcase_04 AC 78 ms
76,372 KB
testcase_05 AC 81 ms
76,096 KB
testcase_06 AC 81 ms
76,172 KB
testcase_07 AC 79 ms
76,144 KB
testcase_08 AC 78 ms
76,040 KB
testcase_09 AC 82 ms
76,004 KB
testcase_10 AC 80 ms
76,196 KB
testcase_11 AC 77 ms
75,912 KB
testcase_12 AC 80 ms
76,076 KB
testcase_13 AC 80 ms
76,268 KB
testcase_14 AC 81 ms
76,176 KB
testcase_15 AC 79 ms
76,052 KB
testcase_16 AC 80 ms
75,872 KB
testcase_17 AC 80 ms
76,144 KB
testcase_18 AC 80 ms
76,000 KB
testcase_19 AC 78 ms
76,312 KB
testcase_20 AC 79 ms
76,272 KB
testcase_21 AC 80 ms
76,052 KB
testcase_22 AC 80 ms
75,936 KB
testcase_23 AC 79 ms
76,172 KB
testcase_24 AC 81 ms
76,144 KB
testcase_25 AC 81 ms
76,140 KB
testcase_26 AC 81 ms
76,172 KB
testcase_27 AC 80 ms
75,932 KB
testcase_28 AC 80 ms
75,876 KB
testcase_29 AC 79 ms
76,196 KB
testcase_30 AC 81 ms
76,312 KB
testcase_31 AC 75 ms
71,392 KB
testcase_32 AC 72 ms
71,108 KB
testcase_33 AC 98 ms
76,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import isqrt

def solve():
  n=int(input())
  a=list(map(int,input().split()))
  tmp=1
  for i in a:
    tmp*=i
  s=isqrt(tmp)
  if s*s==tmp:
    print('Yes')
  else:
    print('No')

for _ in range(int(input())):
  solve()
0