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 n = int.Parse(Console.ReadLine());
- BigInteger highestSnowballValue ;
- BigInteger currentSnowBallValue ;
- int highestSnowBallSnow = 0;
- int highestSnowBallTime = 0;
- int highestSnowBallQuality = 0;
- for (int i = 0; i < n; i++)
- {
- int snowballSnow = int.Parse(Console.ReadLine());
- int snowballTime = int.Parse(Console.ReadLine());
- int snowballQuality = int.Parse(Console.ReadLine());
- if (snowballQuality == 0)
- {
- currentSnowBallValue = snowballSnow / snowballTime;
- }
- else
- {
- currentSnowBallValue = snowballSnow / snowballTime;
- BigInteger gradationNumber = currentSnowBallValue;
- for (int j = 1; j < snowballQuality; j++)
- {
- currentSnowBallValue *= gradationNumber;
- }
- }
- if(currentSnowBallValue > highestSnowballValue)
- {
- highestSnowballValue = currentSnowBallValue;
- highestSnowBallSnow = snowballSnow;
- highestSnowBallTime = snowballTime;
- highestSnowBallQuality = snowballQuality;
- }
- }
- Console.WriteLine($"{highestSnowBallSnow} : {highestSnowBallTime} = {highestSnowballValue} ({highestSnowBallQuality})");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement