Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- numbers= [x for x in input().split(' ')]
- half= len(numbers) // 2
- time_1 = 0
- time_2 = 0
- first_racer = numbers[:half]
- second_racer = numbers[half+1:][::-1]
- for j in first_racer:
- time_1 += int(j)
- if int(j) == 0:
- time_1 *= 0.8
- for i in second_racer:
- time_2 += int(i)
- if int(i) == 0:
- time_2 *= 0.8
- if time_1 > time_2:
- print(f'The winner is right with total time: {time_2:.1f}')
- else:
- print(f'The winner is left with total time: {time_1:.1f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement