Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Numerics;
- using System.Text;
- using System.Threading.Tasks;
- namespace Snowballs
- {
- class Program
- {
- static void Main()
- {
- int snowballsCounter = int.Parse(Console.ReadLine());
- int snowballSnow = int.Parse(Console.ReadLine());
- int snowballTime = int.Parse(Console.ReadLine());
- int snowballQuality = int.Parse(Console.ReadLine());
- BigInteger value = snowballSnow / snowballTime;
- BigInteger snowballValue = BigInteger.Pow(value,snowballQuality);
- BigInteger biggestValue = snowballValue;
- int highestSnow = snowballSnow;
- int highestTime = snowballTime;
- for (int i = 1; i <= snowballsCounter - 1; i++)
- {
- int newsSnowballSnow = int.Parse(Console.ReadLine());
- int newSnowballTime = int.Parse(Console.ReadLine());
- int newSnowballQuality = int.Parse(Console.ReadLine());
- BigInteger newValue = snowballSnow / snowballTime;
- BigInteger newSnowballValue = BigInteger.Pow(newValue,newSnowballQuality);
- if(newSnowballValue > snowballValue)
- {
- snowballValue = newSnowballValue;
- highestSnow = newsSnowballSnow;
- highestTime = newSnowballTime;
- }
- }
- Console.WriteLine($"{highestSnow} : {highestTime} = {biggestValue} ({snowballQuality})");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement