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 1165. Subnumber

Why WA on test #9 ?
Posted by Black^n^White 8 Jan 2007 16:04
It's so simple in C# ...
But what's wrong ?

using System;
using System.Text;
using System.IO;

    class Program
    {
        static void Main()
        {
            StringBuilder seq = new StringBuilder();
            for (ulong i = 1; i < 100000; ++i)
            {
                seq.Append(i);
            }
            string str = seq.ToString();
            string j = Console.ReadLine();
            Console.WriteLine(str.IndexOf(j) + 1);
        }
    }
Re: Why WA on test #9 ?
Posted by Slam [Tartu U] 8 Jan 2007 16:21
try 999...999 (200 nines)