|
|
вернуться в форумUncorrect I get AC, but I can't undestand this... var k,p,x,y:int64; begin k:=1; p:=3; x:=0; y:=2; // Like a test #0 (sample) if (x*x+y*y)=k mod p then writeln('correct test') else writeln('uncorrect test'); // x^2+y^2=k(mod p) end. So, anybody can tell me, why sample test is "uncorrect"? Re: Uncorrect Because here can be many correct test, for example 0 1, 2 3 etc. So 1-st test is correct (0^2 + 2^2)mod 3 = 1(mod 3) Re: Uncorrect x^2+y^2 = k (mod p) mean in mathematics that (x^2 + y^2) mod p = k mod p |
|
|