ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1204. Idempotents

Solution
Posted by Hakobyan Tigran (RAU) 13 Dec 2010 22:44
0 and 1 is trivial solution.
Let x solution it must satisfy for follow requirements:
{x=0(mod p);x=1(mod q);} or
{x=0(mod q);x=1(mod p);}
We can find 2 solution for these equation let it be x1,x2;
And all solution will satisyf for follow requirements (x1+lcm(p,q))mod n,(x2+lcm(p,q))mod n;
but lcm(p,q)==n we have only for solutions
0 1 x1 x2;
Sorry for bad English!
Re: Solution
Posted by YSYMYTH 4 Jun 2013 17:29
very remarkable