|
|
back to boardCan someone explain that? I don't understand what's the hint in this problem! I read it and I think this code must be enough to solve that problem in c#: using System; namespace ConsoleApplication1 { class Program1243 { static void Main() { ulong n = Convert.ToUInt64(Console.ReadLine()); Console.WriteLine(n%7);
} } } But I get WA#5. And I don't understand! Can someone help me? . . .
Re: Can someone explain that? Posted by OZone 5 Apr 2013 04:25 10^50 does not fit into UInt64. BigInteger integer does. However you could try to divide string by 7, or use some more sophiscated math (O(N), no divisions at all). |
|
|