@pdbaker/

R2-Prac-Q5

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
nums = [int(i) for i in input().split()]
answer = 0

for i in range(len(nums)):
    if nums[i] == 13:
        continue
    elif i>0 and nums[i-1] == 13:
        continue
    else:
        answer += nums[i]

print(answer)