|
|
вернуться в форумПоказать все сообщения Спрятать все сообщенияWe are asked to find x, that x*x-x delitsa na N, N-proizvedenie dvuh prostih 4isel. Gde i o6ibaus, WA na vtorom teste Uslovie takoe. WA na vtorom teste ni o chem ne govorit, poskol'ku vo vseh testah, krome pervogo, K = 1000. Opishi svoj algoritm hot'a by. Vasya said: I think I understand problem wrong, please help. Did I understood [how is it in past?] problem description right? I have WA on test 2. I said: You understood description well. WA#2 doesn't tell about anything, because in all tests besides first K = 1000. You'd better tell what algo you used. My english is not very good x(x-1) devides by n, n is a product of two distinct primes p and q, and there are two cases:1) x devides by p, (x-1) devides by q;2) x devides by q, (x-1) devides by p; WA on second test maybe n can have another deviders, not only two:p and q? maybe n can have another deviders, not only two:p and q? for example: n=30 (2*3*5) Ansver = 0 1 6 10 15 16 21 25 |
|
|