Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _11._Snowballs
- {
- class Program
- {
- static void Main(string[] args)
- {
- int numberSnowballs = int.Parse(Console.ReadLine());
- ulong theBestSnowballs = 0;
- int theBestSnowballSnow = 0;
- int theBestSnowballTime = 0;
- int theBestSnowballQuality = 0;
- for (int i = 1; i <= numberSnowballs; i++)
- {
- int snowballSnow = int.Parse(Console.ReadLine());
- int snowballTime = int.Parse(Console.ReadLine());
- int snowballQuality = int.Parse(Console.ReadLine());
- ulong snowballValue = (ulong) Math.Pow((snowballSnow / snowballTime), snowballQuality);
- if (snowballValue > theBestSnowballs)
- {
- theBestSnowballs = snowballValue;
- theBestSnowballSnow = snowballSnow;
- theBestSnowballTime = snowballTime;
- theBestSnowballQuality = snowballQuality;
- }
- }
- Console.WriteLine($"{theBestSnowballSnow} : {theBestSnowballTime} = {theBestSnowballs} ({theBestSnowballQuality})");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment