Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def calculate_snowball_value(weight, time, quality):
- return (weight / time) ** quality
- N = int(input())
- highest_value = 0
- best_snowball = None
- for _ in range(N):
- weight = int(input())
- time = int(input())
- quality = int(input())
- snowball_value = calculate_snowball_value(weight, time, quality)
- if snowball_value > highest_value:
- highest_value = snowball_value
- best_snowball = (weight, time, quality)
- snowball_weight, snowball_time, snowball_quality = best_snowball
- print(f"{snowball_weight} : {snowball_time} = {int(highest_value)} ({snowball_quality})")
Advertisement
Add Comment
Please, Sign In to add comment