본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 21197번 Stopwatch

by 현장 2022. 11. 3.

-Code

stopWatch = [int(input()) for _ in range(int(input()))]
if len(stopWatch) % 2 == 1:
    print("still running")
else:
    result = 0
    for i in range(0, len(stopWatch), 2):
        result += stopWatch[i + 1] - stopWatch[i]
    print(result)