結果
問題 |
No.1816 MUL-DIV Game
|
ユーザー |
![]() |
提出日時 | 2022-01-21 22:10:20 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 259 bytes |
コンパイル時間 | 251 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 90,752 KB |
最終ジャッジ日時 | 2024-11-26 00:33:11 |
合計ジャッジ時間 | 5,321 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 WA * 21 |
ソースコード
N=int(input()) A=list(map(int,input().split())) for i in range(N): A[i]*=-1 from heapq import * heapify(A) C=0 while N>1: x=-heappop(A) y=-heappop(A) if C&1: heappush(A,-((x+y-1)//y)) else: heappush(A,-(x*y)) N-=1 C+=1 print(-heappop(A))