Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _11Snowballs
- {
- class Program
- {
- static void Main(string[] args)
- {
- int numberSnowballs = int.Parse(Console.ReadLine());
- double bestValue = double.MinValue;
- int bestSnow = 0;
- int bestTime = 0;
- int bestQuality = 0;
- for (int i = 0; i < numberSnowballs; i++)
- {
- int snowballSnow = int.Parse(Console.ReadLine());
- int snowballTime = int.Parse(Console.ReadLine());
- int snowballQuality = int.Parse(Console.ReadLine());
- double snowballValue = Math.Pow(((double)snowballSnow / (double)snowballTime), (double)snowballQuality);
- if (bestValue <= snowballValue)
- {
- bestSnow = snowballSnow;
- bestTime = snowballTime;
- bestQuality = snowballQuality;
- bestValue = snowballValue;
- }
- }
- Console.WriteLine($"{bestSnow} : {bestTime} = {bestValue} ({bestQuality})");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement