13 lines
310 B
Python
13 lines
310 B
Python
from typing import Any, Iterator
|
|
|
|
from ..base import BaseSolver
|
|
|
|
|
|
class Solver(BaseSolver):
|
|
def solve(self, input: str) -> Iterator[Any]:
|
|
blocks = input.split("\n\n")
|
|
values = sorted(sum(map(int, block.split())) for block in blocks)
|
|
|
|
yield values[-1]
|
|
yield sum(values[-3:])
|