結果
問題 |
No.2074 Product is Square ?
|
ユーザー |
![]() |
提出日時 | 2022-09-16 23:45:31 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 417 bytes |
コンパイル時間 | 330 ms |
コンパイル使用メモリ | 82,328 KB |
実行使用メモリ | 74,340 KB |
最終ジャッジ日時 | 2024-12-21 23:26:29 |
合計ジャッジ時間 | 3,258 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 31 RE * 2 |
ソースコード
def is_square(apositiveint): x = apositiveint // 2 seen = set([x]) while x * x != apositiveint: x = (x + (apositiveint // x)) // 2 if x in seen: return False seen.add(x) return True t = int(input()) for i in range(t): n = int(input()) a = list(map(int, input().split())) mul = 1 for e in a: mul *= e if is_square(e): print("No") else: print("Yes")