Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace BeerKegs
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- string bigModel = "";
- double biggest = 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 sum = Math.PI * radius * radius * height;
- if (sum > biggest)
- {
- biggest = sum;
- bigModel = model;
- }
- }
- Console.WriteLine(bigModel);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement