結果
問題 |
No.1816 MUL-DIV Game
|
ユーザー |
![]() |
提出日時 | 2022-01-21 22:04:52 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 300 bytes |
コンパイル時間 | 362 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 94,336 KB |
最終ジャッジ日時 | 2024-11-26 00:15:04 |
合計ジャッジ時間 | 3,438 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 8 WA * 19 |
ソースコード
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])