結果

問題 No.1816 MUL-DIV Game
ユーザー hir355
提出日時 2022-01-21 21:27:13
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 202 bytes
コンパイル時間 198 ms
コンパイル使用メモリ 82,268 KB
実行使用メモリ 84,864 KB
最終ジャッジ日時 2024-11-25 22:37:52
合計ジャッジ時間 2,763 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
ans = a[0]
for i in range(1, n):
    if i % 2 == 1:
        ans *= a[i]
    else:
        ans = (ans - 1) // a[i] + 1
print(ans)
0