結果
問題 | No.2074 Product is Square ? |
ユーザー | とりゐ |
提出日時 | 2022-09-17 01:51:30 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 376 bytes |
コンパイル時間 | 285 ms |
コンパイル使用メモリ | 86,408 KB |
実行使用メモリ | 86,176 KB |
最終ジャッジ日時 | 2023-08-23 17:22:55 |
合計ジャッジ時間 | 5,526 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 70 ms
75,268 KB |
testcase_01 | AC | 123 ms
76,764 KB |
testcase_02 | AC | 118 ms
76,100 KB |
testcase_03 | AC | 123 ms
76,552 KB |
testcase_04 | AC | 115 ms
75,960 KB |
testcase_05 | AC | 118 ms
76,272 KB |
testcase_06 | AC | 120 ms
76,560 KB |
testcase_07 | AC | 117 ms
76,188 KB |
testcase_08 | AC | 116 ms
76,184 KB |
testcase_09 | AC | 115 ms
76,620 KB |
testcase_10 | AC | 119 ms
76,172 KB |
testcase_11 | TLE | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
ソースコード
def floor_sqrt(n): if n<0: return -1 ng,ok=n+1,-1 while ng-ok>1: mid=(ok+ng)//2 if mid*mid<=n: ok=mid else: ng=mid return ok def solve(): n=int(input()) a=list(map(int,input().split())) tmp=1 for i in a: tmp*=i s=floor_sqrt(tmp) if s*s==tmp: print('Yes') else: print('No') for _ in range(int(input())): solve()