Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Collections.Generic;
- public class Program
- {
- public static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- string bestKeg = string.Empty;
- double bestVolume =0;
- for (int i=0; i<n; i++)
- {
- string model = Console.ReadLine();
- double radius = double.Parse(Console.ReadLine());
- int height = int.Parse(Console.ReadLine());
- double currVol = Math.PI * (radius*radius) * height;
- if (currVol>bestVolume)
- {
- bestKeg = model;
- bestVolume = currVol;
- }
- }
- Console.WriteLine(bestKeg);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement