您最多选择25个主题
主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
|
- 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))
|