Advertisement
Spocoman

04. Number Beggars

Jan 22nd, 2022
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. numbers = input().split(", ")
  2. beggars = [0] * int(input())
  3.  
  4. for i in range(len(beggars)):
  5.     for j in range(i, len(numbers), len(beggars)):
  6.         beggars[i] += int(numbers[j])
  7.  
  8. print(beggars)
  9.  
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement