|
|
back to boardWhy I got "Crash (access violation)" on 1st test? What C# compiler is used on the server? It is my source: /* Timus Online Judge * Задача 1601. АнтиКАПС * */ using System; using System.Text; internal class Task_1601 { private static StringBuilder message; public static void Main( ) { Input( ); Solve( ); Output( ); } private static void Input( ) { message = new StringBuilder( ); string s = null, t; bool MakeCapitalLetters = true; while ( s != "" ) { s = Console.ReadLine( ); for ( int i = 0; i < s.Length; ++i ) { t = s[ i ].ToString( ); if ( MakeCapitalLetters && s[ i ] != ' ' ) { message.Append( t ); MakeCapitalLetters = false; } else { if ( s[ i ]== '.' || s[ i ]=='!' || s[ i ]=='?' ) { MakeCapitalLetters = true; } message.Append( t.ToLower( ) ); } } message.AppendLine( ); } } private static void Solve( ) { } private static void Output( ) { Console.Write( message ); } } Excuse me for my English. Edited by author 16.03.2008 16:35 |
|
|