ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1020. Rope

What 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? / Что не так?
Posted by Kovalyshyn Artur 9 Feb 2017 18:17
(pi*r^2)

Edited by author 09.02.2017 18:21
Re: What is wrong? / Что не так?
Posted by ToadMonster 9 Feb 2017 19:07
> sum += double.Parse(input[0]) + double.Parse(input[1]);

How it should work? Google "points distance formula".