using System; using System.Collections.Generic; class Program { static string InputPattern = "Input4"; static List GetInputList() { var WillReturn = new List(); if (InputPattern == "Input1") { WillReturn.Add("100"); //50 } else if (InputPattern == "Input2") { WillReturn.Add("2500"); //2.94117647058824 } else if (InputPattern == "Input3") { WillReturn.Add("1"); //99.0196078431373 } else { string wkStr; while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr); } return WillReturn; } //No.221 犯罪都市 static void Main() { List InputList = GetInputList(); decimal N = decimal.Parse(InputList[0]); //PA=マフィアで、判定器がマフィアと判定 //PB=マフィアでなくて、判定器がマフィアと判定 decimal PA = N / 10000M * 0.99M; decimal PB = (10000M - N) / 10000M * 0.01M; Console.WriteLine(100M * PB / (PA + PB)); } }