結果
問題 |
No.1816 MUL-DIV Game
|
ユーザー |
![]() |
提出日時 | 2022-01-21 21:23:49 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 304 bytes |
コンパイル時間 | 323 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 93,952 KB |
最終ジャッジ日時 | 2024-11-25 22:33:14 |
合計ジャッジ時間 | 3,009 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 WA * 15 |
ソースコード
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.popleft() y = A.pop() A.appendleft((x+y-1)//y) print(A[0])