結果

問題 No.1816 MUL-DIV Game
ユーザー hirakuhiraku
提出日時 2022-01-21 21:34:39
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 220 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 266,292 KB
最終ジャッジ日時 2024-05-04 12:07:45
合計ジャッジ時間 8,803 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
57,344 KB
testcase_01 AC 36 ms
52,096 KB
testcase_02 AC 33 ms
52,608 KB
testcase_03 AC 34 ms
52,736 KB
testcase_04 AC 33 ms
52,480 KB
testcase_05 AC 37 ms
52,736 KB
testcase_06 AC 37 ms
52,352 KB
testcase_07 AC 36 ms
52,608 KB
testcase_08 AC 35 ms
52,096 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 TLE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 TLE -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import heapq

n = int(input())
A = list(map(int, input().split()))
A = [-a for a in A]
heapq.heapify(A)
while len(A) > 1:
    a1 = heapq.heappop(A)
    a2 = heapq.heappop(A)
    heapq.heappush(A, -a1 * a2)

print(-A[0])
0