|
|
вернуться в форумОбщий форумC# programming language is supported now (+) The compiler is Microsoft ® Visual C# 2005 Compiler version 8.00.50727.42 (.NET Framework 2.0). The most of problems can be solved using C#, except for those that can't be solved with Java (1220, 1275, 1306). Edited by author 31.12.2006 01:31 Sample solution for A+B Problem in C# (+) using System; public class Sum { public static void Main() { string[] tokens = Console.ReadLine().Split(' '); Console.WriteLine(int.Parse(tokens[0]) + int.Parse(tokens[1])); } } If you need to read or write double (+) If you need to read or write double in your program, do not forget set culture to InvariantCulture: Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; One more hint for C# programmers (+) In some problems numbers are not necessarily separated with single space. Use Console.ReadLine().Split(new char[] {' ', '\t'}, StringSplitOptions.RemoveEmptyEntries) instread of Console.ReadLine().Trim().Split(' ') C# compiler updated C# compiler has been updated to Microsoft Visual C# 2008 version 3.5.30729.1 (.NET Framework 3.5) FAQ section on C# added (-) The default decimal separator is now set to “.” (+) The default decimal separator is now set to “.” All C# submissions to problems with floating-point numbers in input or output were rejudged. The verticts of about 800 submissions of 100 authors were changed. Re: One more hint for C# programmers (+) I have try to make some optimisation of input-output, but native read of stream does not bring some significant effect, and try of use Win32 api functions faults with runtime error on test 1 of task 1000. Where is the way to looking for? |
|
|