t = parse(Int, readline()) for case = 1:t readline() ds = readline() |> split .|> (x -> parse(Int, x)) |> sort at = 0 for d = ds at += d > at end println("Case #", case, ": ", at) end