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 1001. Reverse Root

Why do I get Runtime error C#
Posted by Jaideep Chandra 15 Jun 2016 13:49
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace Problem_1001
{
    class Program
    {
        static void Main(string[] args)
        {

            ulong[] input = new ulong[4];
            for (int i = 0; i < input.Length; i++)
            {
                input[i] = ulong.Parse(Console.ReadLine());
            }

            for (int i = input.Length - 1; i >= 0; i--)
            {

                Console.WriteLine(String.Format("{0:F4}",Math.Sqrt(input[i])));
            }

            //Console.ReadLine();
        }
    }
}
Re: Why do I get Runtime error C#
Posted by ToadMonster 16 Jun 2016 21:01
You think there are exactly 4 numbers in the input. Also you think there is 1 number per line.
Please show task fragment describing input format as you think.

Edited by author 16.06.2016 21:02