結果

問題 No.1816 MUL-DIV Game
ユーザー brthyyjpbrthyyjp
提出日時 2022-01-21 22:05:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 300 bytes
コンパイル時間 1,716 ms
コンパイル使用メモリ 85,780 KB
実行使用メモリ 93,112 KB
最終ジャッジ日時 2023-08-17 06:07:37
合計ジャッジ時間 5,468 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
71,072 KB
testcase_01 AC 93 ms
71,252 KB
testcase_02 AC 93 ms
71,268 KB
testcase_03 AC 93 ms
71,268 KB
testcase_04 AC 91 ms
70,888 KB
testcase_05 AC 93 ms
71,204 KB
testcase_06 AC 91 ms
71,148 KB
testcase_07 AC 90 ms
71,256 KB
testcase_08 AC 91 ms
70,888 KB
testcase_09 AC 110 ms
77,280 KB
testcase_10 AC 122 ms
81,276 KB
testcase_11 AC 123 ms
81,624 KB
testcase_12 AC 120 ms
80,244 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 151 ms
93,112 KB
testcase_27 WA -
testcase_28 AC 154 ms
93,056 KB
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int, input().split()))
A.sort()
from collections import deque
A = deque(A)
for i in range(n-1):
    if i%2 == 0:
        x = A.pop()
        y = A.pop()
        A.append(x*y)
    else:
        y = A.pop()
        x = A.pop()
        A.appendleft((x+y-1)//y)
print(A[0])
0