Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import string
- import sys
- name = input()
- max_sum = -sys.maxsize-1
- current_sum = 0
- winner = ""
- while name != "STOP":
- for letter in name:
- current_sum += ord(letter)
- if current_sum > max_sum:
- max_sum = current_sum
- winner = name
- name = input()
- current_sum = 0
- print(f"Winner is {winner} - {max_sum}!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement