Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Numerics;
- public class Program
- {
- public static void Main()
- {
- int snowballs = int.Parse(Console.ReadLine());
- BigInteger highestValue =0;
- int bestSnow =0;
- int bestTime =0;
- int bestQuality =0;
- for (int i=1; i<=snowballs; i++)
- {
- int snowballSnow = int.Parse(Console.ReadLine());
- int snowballTime = int.Parse(Console.ReadLine());
- int snowballQuality = int.Parse(Console.ReadLine());
- BigInteger snowballValue = BigInteger.Pow((snowballSnow/snowballTime),snowballQuality);
- if (snowballValue >highestValue)
- {
- highestValue = snowballValue;
- bestSnow = snowballSnow;
- bestTime = snowballTime;
- bestQuality = snowballQuality;
- }
- }
- Console.WriteLine("{0} : {1} = {2} ({3})",bestSnow,bestTime,highestValue,bestQuality);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement