結果
問題 | No.2074 Product is Square ? |
ユーザー | prussian_coder |
提出日時 | 2022-09-18 15:36:08 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 355 bytes |
コンパイル時間 | 1,002 ms |
コンパイル使用メモリ | 86,660 KB |
実行使用メモリ | 78,048 KB |
最終ジャッジ日時 | 2023-08-23 18:09:27 |
合計ジャッジ時間 | 12,439 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 74 ms
71,592 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 362 ms
76,936 KB |
testcase_12 | AC | 339 ms
77,184 KB |
testcase_13 | WA | - |
testcase_14 | AC | 364 ms
77,216 KB |
testcase_15 | WA | - |
testcase_16 | AC | 347 ms
77,184 KB |
testcase_17 | WA | - |
testcase_18 | AC | 366 ms
77,000 KB |
testcase_19 | AC | 363 ms
77,324 KB |
testcase_20 | AC | 343 ms
77,344 KB |
testcase_21 | WA | - |
testcase_22 | AC | 359 ms
77,216 KB |
testcase_23 | AC | 358 ms
77,292 KB |
testcase_24 | AC | 340 ms
77,008 KB |
testcase_25 | WA | - |
testcase_26 | AC | 360 ms
77,140 KB |
testcase_27 | AC | 361 ms
77,068 KB |
testcase_28 | AC | 344 ms
76,912 KB |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | AC | 70 ms
71,732 KB |
testcase_33 | AC | 113 ms
78,000 KB |
ソースコード
T=int(input()) import math for _ in range(T): N=int(input()) A=[int(x) for x in input().split()] A.sort() for i in range(N): for j in range(i+1,N): a=math.gcd(A[i],A[j]) A[i]//=a A[j]//=a flag=True for i in range(N): t=(A[i])**0.5 if t**2!=A[i] and (t+1)**2!=A[i]: print("No") flag=False break if flag: print("Yes")