|
|
вернуться в форумWhat is wrong? / Что не так? using System; using System.Threading; using System.Globalization; namespace TestOfCSharp { class Program { static void Main(string[] args) { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; string[] input = Console.ReadLine().Split(' '); int N = int.Parse(input[0]); int R = int.Parse(input[1]); double sum = 0; for (int i = 0; i < N; i++) { input = Console.ReadLine().Split(' '); sum += double.Parse(input[0]) + double.Parse(input[1]); } sum += 2 * Math.PI * R; Console.WriteLine("{0:F2}", sum); } } } Edited by author 20.12.2013 05:18 Re: What is wrong? / Что не так? (pi*r^2) Edited by author 09.02.2017 18:21 Re: What is wrong? / Что не так? > sum += double.Parse(input[0]) + double.Parse(input[1]); How it should work? Google "points distance formula". |
|
|