結果

問題 No.1816 MUL-DIV Game
ユーザー brthyyjpbrthyyjp
提出日時 2022-01-21 22:04:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 300 bytes
コンパイル時間 398 ms
コンパイル使用メモリ 87,224 KB
実行使用メモリ 94,024 KB
最終ジャッジ日時 2023-08-17 06:06:38
合計ジャッジ時間 5,140 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
71,868 KB
testcase_01 AC 96 ms
71,708 KB
testcase_02 AC 93 ms
71,792 KB
testcase_03 AC 91 ms
71,796 KB
testcase_04 AC 93 ms
71,644 KB
testcase_05 AC 89 ms
71,728 KB
testcase_06 AC 91 ms
71,596 KB
testcase_07 AC 91 ms
71,792 KB
testcase_08 AC 91 ms
71,732 KB
testcase_09 WA -
testcase_10 AC 120 ms
82,196 KB
testcase_11 AC 118 ms
82,300 KB
testcase_12 WA -
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 WA -
testcase_27 WA -
testcase_28 WA -
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:
        x = A.pop()
        y = A.pop()
        A.appendleft((x+y-1)//y)
print(A[0])
0