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 1011. Conductors

Runtime error
Posted by Grigorenko Vlad 24 Jul 2013 21:24
Why I have Runtime error? I use C#. Code is here.
using System;
using System.Globalization;

class EntryPoint
{
    static void Main()
    {
        CultureInfo ci = new CultureInfo("en-US");
        double p = Convert.ToDouble(Console.ReadLine(),ci);
        double q = Convert.ToDouble(Console.ReadLine(),ci);
        int x = 1;
        while (true)
        {
            if ((int)(q * x / 100) - (int)(p * x / 100) > 0)
                break;
            x++;
        }
        Console.WriteLine(x);
    }
}
Re: Runtime error
Posted by vers 17 Feb 2014 03:40
Quote from problem description:
"These numbers are separated by some spaces or "end of line" symbols"