Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- coins = list(map(int, input().split(",")))
- beggars = int(input())
- list_of_beggars = [0] * beggars
- counter_beggars = 0
- for coin in coins:
- list_of_beggars[counter_beggars] += coin
- counter_beggars += 1
- if counter_beggars >= beggars:
- counter_beggars = 0
- print(list_of_beggars)
Add Comment
Please, Sign In to add comment