|  | 
|  | 
| вернуться в форум | Python3 answer k, n = [int(x) for x in input().split()]a = list(map(int, input().split()))
 m = 0
 
 for i in a:
 m += i
 if (m - k >= 0):
 m -= k
 else:
 m = 0
 print(m)
Re: Python3 answer Послано ok_SYS  19 дек 2021 18:21explain please. for whar we need n then?Re: Python3 answer try this example:4 3
 1 5 6
 You cannot pass the sixth test. In the first minute there are 0 cars left. In the second minute there was 1 car left. At the third minute there were 2+1 cars left.
 Read the conditions of the task more carefully. ))))
 | 
 | 
|