|
|
back to boardDiscussion of Problem 1020. RopeWhat is wrong? / Что не так? Posted by bulka94 20 Dec 2013 05:17 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". |
|
|