Re: [algogeeks] ITRIX'12 OPC

2012-03-16 Thread shady
i wanted to try the questions now, but can't submit, can you provide the problems, and testdata ? On Mon, Mar 12, 2012 at 10:41 PM, Kashyap Krishnakumar kashyap...@gmail.com wrote: Hi, The online programming contest of ITRIX, the national level technical symposium of the Department of

[algogeeks] Re: Math Question

2012-03-16 Thread Gene
This is very beautiful. Here is a less elegant proof, though it leads to an efficient algorithm. In a different problem some time ago, there was a statement that every number with a 3 in the units position has a multiple that consists of all 1s. The proof needs a little number theory. Any

[algogeeks] Re: Math Question

2012-03-16 Thread Gene
I'm sorry there's an algebra error here, but fortunately the proof still works. It should be From this, algebra provides 10^e - 1 == 0 (mod 9Y) and 10^e == 1 (mod 9Y). But 9Y and 10^e are still coprime, so we're good. Here is code that seems to be working fine. #include stdio.h int main(int