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)
- {
- byte number = byte.Parse(Console.ReadLine());
- int snowballSnow = 0;
- int snowballTime = 0;
- int snowballQuality = 0;
- int greatSnowballSnow = 0;
- int greatSnowballTime = 0;
- int greatSnowballQuality = 0;
- BigInteger snowballValue = 0;
- for (int i = 0; i < number ; i++)
- {
- snowballSnow = int.Parse(Console.ReadLine());
- snowballTime = int.Parse(Console.ReadLine());
- snowballQuality = int.Parse(Console.ReadLine());
- int currentValue = snowballSnow / snowballTime;
- BigInteger powCurrentValue = BigInteger.Pow(currentValue, snowballQuality);
- if (powCurrentValue >= snowballValue)
- {
- snowballValue = powCurrentValue;
- greatSnowballSnow = snowballSnow;
- greatSnowballTime = snowballTime;
- greatSnowballQuality = snowballQuality;
- }
- }
- Console.WriteLine($"{greatSnowballSnow} : {greatSnowballTime} = {snowballValue} ({greatSnowballQuality})");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement