Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- number_of_kozunacs = int(input())
- max_points = 0
- baker_with_max_points = ''
- for each_kozunac in range(number_of_kozunacs): # 1
- name_of_baker = input()
- command = input()
- total_score = 0
- while command != 'Stop':
- score = int(command)
- total_score += score
- command = input()
- print(f"{name_of_baker} has {total_score} points.")
- if total_score > max_points:
- max_points = total_score
- baker_with_max_points = name_of_baker
- print(f"{baker_with_max_points} is the new number 1!")
- print(f"{baker_with_max_points} won competition with {max_points} points!")
Advertisement
Add Comment
Please, Sign In to add comment