Question
Return the k-th value in descending order from an integer array, treating equal values as separate entries. The input arrives in one of two line layouts. ```python def solve(raw: str) -> str: ... ``` ## Requirements - Layout A: line one is the element count, line two holds the integers, and line three is `k`. - Layout B: line one is `nums=[3,2,1,5,6,4]` and line two is `k=2`, with no space before either equals sign. - `k` is one-based and always lies between 1 and the array length, so `k = 1` asks for the maximum and `k` equal to the length asks for the minimum. - Return the selected value as a decimal string; it is a value, not a position. - Values may be negative, and duplicates must not be collapsed: with `k = 3` and four equal values, that repeated value is still the answer. - `run_case` passes `case["stdin"]` to `solve`. - Do not append a trailing newline to the returned string; return the value exactly once.