Advertisement
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 snowBalls = int.Parse(Console.ReadLine());
- int bestSnowballValue = 0;
- int[] bestQualities = new int[3];
- for (int i = 0; i < snowBalls; i++)
- {
- int[] snowballsQualities = new int[3];
- //({snowballSnow}, {snowballTime}, {snowBallQuality})
- for (int j = 0; j < snowballsQualities.Length; j++)
- {
- snowballsQualities[j] = int.Parse(Console.ReadLine());
- }
- int snowballValue = (int)Math.Pow(
- (snowballsQualities[0] / snowballsQualities[1]),
- snowballsQualities[2]);
- if (snowballValue > bestSnowballValue)
- {
- bestQualities = snowballsQualities;
- bestSnowballValue = snowballValue;
- }
- }
- Console.WriteLine($"{bestQualities[0]} : {bestQualities[1]} = {bestSnowballValue} ({bestQualities[2]})");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement