Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def list_sum(arr: list) -> float:
- if len(arr) == 1:
- return arr[0]
- else:
- return list_sum(arr[1:]) + arr[0]
- def main() -> None:
- arr: list = [float(item) for item in input().split()]
- first: list = arr[0: 6]
- second: list = arr[6: 12]
- third: list = arr[12: 18]
- results = [list_sum(first), list_sum(second), list_sum(third)]
- mx, index = 0, 0
- for i in range(3):
- if results[i] >= mx:
- index = i
- mx = results[i]
- if index == 0:
- print('I')
- elif index == 1:
- print('II')
- elif index == 2:
- print('III')
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement