fork download
  1. pref = [0]
  2. _ = input()
  3. for liczba in map(int, input().split()):
  4. pref.append(pref[-1]+liczba)
  5. print(pref)
Success #stdin #stdout 0.03s 9792KB
stdin
6 5
1 3 4 5 6 7
2 3 6 6 7
stdout
[0, 1, 4, 8, 13, 19, 26]