using System.Collections;
using System.Collections.Generic;
public static void Main()
int n=Convert.ToInt32(Console.ReadLine());
string CompanyName=Console.ReadLine();
double SharePrice=Convert.ToDouble(Console.ReadLine());
int noofshare=Convert.ToInt32(Console.ReadLine());
string Exchange=Console.ReadLine();
var vehi=new Company(CompanyName,SharePrice, noofshare,Exchange);
int ch=Convert.ToInt32(Console.ReadLine());
string tr=Console.ReadLine();
double cap=StockMarket.MarketCapValue(tr);
Console.WriteLine("No company registered with name {0}",tr);
Console.WriteLine("{0}:{1}",tr,cap);
List<Company> ll=StockMarket.topCo();
Console.WriteLine("Insufficient data");
double sp=Math.Round(p.SharePrice,2);
double mc=Math.Round(p.MarketCap,2);
Console.WriteLine("{0}:{1}:{2}:{3}",p.CompanyName,sp,mc,p.Exchange);
public string CompanyName{get;set;}
public double MarketCap{get;set;}
public double SharePrice{get;set;}
public int noofshare{get;set;}
public string Exchange{get;set;}
public Company(string CompanyName,double SharePrice,int noofshare,string Exchange)
this.CompanyName=CompanyName;
this.SharePrice=SharePrice;
this.noofshare=noofshare;
MarketCap=SharePrice*noofshare;
public static class StockMarket
public static List<Company> cc=new List<Company>();
public static void Add(Company k)
public static double MarketCapValue(string cN)
foreach(Company c in cc.FindAll(k=>k.CompanyName.ToUpper().Equals(cN.ToUpper())))
public static List<Company> topCo()
List<Company> cp=new List<Company>();
cp=cc.OrderByDescending(s=>s.MarketCap).ToList();
List<Company> cp1=new List<Company>();