You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
1234567891011121314 |
- import sys
-
-
- text = sys.stdin.read()
- ns = [int(s) for s in text.splitlines()]
-
-
- def handle(n):
- m = n // 3 - 2
- return [m] + handle(m) if m > 0 else []
-
-
- print(sum(handle(n)[0] for n in ns))
- print(sum(sum(handle(n)) for n in ns))
|