Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Numerics;
- namespace Snowballs
- {
- class Program
- {
- static void Main(string[] args)
- {
- int snowBallCount = int.Parse(Console.ReadLine());
- BigInteger snowBallValue = new BigInteger(0);
- BigInteger higestSnValue = new BigInteger(0);
- int bestSnSnow = 0;
- int bestSnTime = 0;
- int bestSnQual = 0;
- for (int i = snowBallCount - 1; i >= 0; i--)
- {
- int snowballSnow = int.Parse(Console.ReadLine());
- int snowballTime = int.Parse(Console.ReadLine());
- int snowballQuality = int.Parse(Console.ReadLine());
- if (snowballTime != 0)
- {
- snowBallValue = BigInteger.Pow((snowballSnow / snowballTime), snowballQuality);
- if (snowBallValue > higestSnValue)
- {
- higestSnValue = snowBallValue;
- bestSnSnow = snowballSnow;
- bestSnTime = snowballTime;
- bestSnQual = snowballQuality;
- }
- }
- }
- Console.WriteLine($"{bestSnSnow} : {bestSnTime} = {higestSnValue:F0} ({bestSnQual})");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement