|
|
вернуться в форумCompilation Error (C#) It runs well on MS Visual C# 2005, but here i get CE using System; using System.Text; class Program { static void Main() { ulong n = ulong.Parse(Console.ReadLine()); ulong sum = 1; ulong ans = 0; ulong a = 2, b = 3, c = 4; ulong a1 = 1, b1 = 1, c1 = 1; for (ulong i = 1; i <= n; ++i) { a1 *= a; a1 %= 1000; b1 *= b; b1 %= 1000; c1 *= c; c1 %= 1000; } sum += a1 + b1 + c1; while (true) { if ((sum % 10) == 0) { ans++; } else { Console.WriteLine(ans); break; } sum /= 10; } } } Edited by author 30.01.2007 15:26 Re: Compilation Error (C#) Послано Akob 21 мар 2007 14:22 Say you what you write on c# Edited by author 21.03.2007 14:23 Re: Compilation Error (C#) Really compilation error? I sent your solution for problem 1000 and it was compiled (I got crash on 1 test). Be sure that you selected correct langyage during submitting Edited by author 21.03.2007 16:47 Re: Compilation Error (C#) man put instead of true sum != 0 |
|
|