SHARE
TWEET

08.BeerKegs

LOH_DIMI3 Jan 24th, 2020 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace Moving
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int count = int.Parse(Console.ReadLine());
  10.  
  11.             double maxValue = double.MinValue;
  12.             string bigModel = "";
  13.  
  14.             for (int i = 0; i < count; i++)
  15.             {
  16.                 string model = Console.ReadLine();
  17.                 double radius = double.Parse(Console.ReadLine());
  18.                 int height = int.Parse(Console.ReadLine());
  19.                 double volume = Math.PI * (radius * radius) * height;
  20.                 if (volume > maxValue)
  21.                 {
  22.                     maxValue = volume;
  23.                     bigModel = model;
  24.                 }
  25.             }
  26.             Console.WriteLine(bigModel);
  27.         }
  28.     }
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top