Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- n = int(input())
- best_chef = ''
- max_rating = -sys.maxsize
- for i in range (1, n + 1):
- baker_name = input()
- rating = input()
- total_rating = 0
- while rating != 'Stop':
- rating = int(rating)
- total_rating += rating
- rating = input()
- print(f"{baker_name} has {total_rating} points.")
- if total_rating > max_rating:
- best_chef = baker_name
- max_rating = total_rating
- print(f"{baker_name} is the new number 1!")
- print(f"{best_chef} won competition with {max_rating} points!")
Advertisement
Add Comment
Please, Sign In to add comment