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