Question
You are given a price for each trading day and may complete as many round trips as you like, holding at most one share at a time. Report the largest total gain reachable across the whole window. ```python def solve(raw: str) -> str: ... ``` ## Requirements - The input has two lines: a day count, then that many space-separated integer prices on the second line. The count matches the number of prices. - A round trip means buying one share on some day and selling it on a later day; positions cannot overlap and short selling is not allowed. - Return the total profit as a plain decimal string. A window with no profitable round trip, including a single day, yields `0`. - Prices are non-negative integers and the day count is at least one. - `run_case` hands the raw text to `solve` as `case["stdin"]`, so read the text from the argument. - Do not append a trailing newline to the returned string; return the value exactly once.