scientific_comp_projects/CODE/[python]kattis/trivial/electrical_outlet.py
2021-10-29 15:16:40 +02:00

17 lines
313 B
Python

n= int(input())
total = []
for i in range(n):
available = 1
needed = 0
datas = input()
datas = datas.split(' ')
needed = int(datas[0])
for j in range(needed):
p = j+1
available = int(datas[p])+available
total.append(available - needed)
for to in total:
print(to)