using System; using System.Collections.Generic; using System.Linq; //YukiCoder419 直角三角形 //http://yukicoder.me/problems/no/419 class Program { static string InputPattern = "InputX"; static List GetInputList() { var WillReturn = new List(); if (InputPattern == "Input1") { WillReturn.Add("4 5"); //3.0000000000 } else if (InputPattern == "Input2") { WillReturn.Add("5 3"); //4.0000000000 } else if (InputPattern == "Input3") { WillReturn.Add("3 4"); //2.6457513111 } else { string wkStr; while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr); } return WillReturn; } static void Main() { List InputList = GetInputList(); double[] wkArr = InputList[0].Split(' ').Select(X => double.Parse(X)).ToArray(); double C = wkArr.Max(); double B = wkArr.Min(); double A = Math.Sqrt(C * C - B * B); Console.WriteLine(A); } }