Compare commits
2 Commits
6b3ff638fe
...
7af7bb41e5
| Author | SHA1 | Date | |
|---|---|---|---|
| 7af7bb41e5 | |||
| 77431c93b4 |
14
zanzibar.py
Normal file
14
zanzibar.py
Normal file
@@ -0,0 +1,14 @@
|
||||
t = int(input())
|
||||
|
||||
for _ in range(t):
|
||||
sequence = list(map(int, input().split()))[:-1]
|
||||
|
||||
prev_s = 1
|
||||
lb_import = 0
|
||||
|
||||
for s in sequence:
|
||||
if s > (prev_s * 2):
|
||||
lb_import += s - prev_s * 2
|
||||
prev_s = s
|
||||
|
||||
print(lb_import)
|
||||
Reference in New Issue
Block a user