Advertisement
lukedinchev

HelpGeorgi

May 26th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.00 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Numerics;
  5.  
  6. namespace Snowballs
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             int numberSnowballsMade = int.Parse(Console.ReadLine());
  13.             List <double> Snowballs = new List<double>();
  14.             double maxSnowball = 0.00;
  15.  
  16.  
  17.             for (int i = 0; i < numberSnowballsMade; i++)
  18.             {
  19.                 int snowballSnow = int.Parse(Console.ReadLine());
  20.                 int snowballTime = int.Parse(Console.ReadLine());
  21.                 int snowballQuality = int.Parse(Console.ReadLine());
  22.                 double valueSnowball = Math.Pow((snowballSnow / snowballTime),snowballQuality);
  23.  
  24.                 Snowballs.Add(valueSnowball);
  25.  
  26.             }
  27.  
  28.             for (int i = 0; i < Snowballs.Count(); i++)
  29.             {
  30.                 maxSnowball = Snowballs.Max();
  31.             }
  32.  
  33.             Console.WriteLine(maxSnowball);
  34.  
  35.  
  36.  
  37.         }
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement