Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- entrance = list(map(float, input().split()))
- index = 0
- while True:
- if index + 1 < len(entrance):
- if entrance[index] == entrance[index + 1]:
- entrance[index] = entrance[index] + entrance[index]
- entrance.pop(index + 1)
- index = -1
- else:
- break
- index += 1
- print(' '.join(map(str, entrance)))
Advertisement
Add Comment
Please, Sign In to add comment