Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- passengers = int(input())
- stations = int(input())
- for i in range(1, stations + 1):
- output_passengers = int(input())
- input_passengers = int(input())
- passengers += input_passengers - output_passengers
- if i % 2 == 1:
- passengers += 2
- else:
- passengers -= 2
- print(f"The final number of passengers is : {passengers}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement