結果
問題 |
No.1816 MUL-DIV Game
|
ユーザー |
|
提出日時 | 2022-01-21 21:24:37 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 184 bytes |
コンパイル時間 | 97 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 21,832 KB |
最終ジャッジ日時 | 2024-11-25 22:34:45 |
合計ジャッジ時間 | 2,819 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 WA * 21 |
ソースコード
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: ans *= a[i] else: ans = (ans + a[i] - 1) // a[i] print(ans)