Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- numbers = input().split(", ")
- beggars = [0] * int(input())
- for i in range(len(beggars)):
- for j in range(i, len(numbers), len(beggars)):
- beggars[i] += int(numbers[j])
- print(beggars)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement