|
|
back to boardtest2 i dont know. program student; var n,k,j1:integer; a,b:longint; function els(var x,y:longint):integer; var i,j:integer; begin i:=2; j:=0; if (y mod x=0) then begin y:=y div x; j:=j+1; while (i<=9)and(y>1) do if(y mod i=0)then begin y:=y div i; j:=j+1; end else i:=i+1; end; els:=j; end; begin read(n); k:=1; while(k<=n) do begin read(a); read(b); k:=k+1; j1:=els(a,b); if(j1>0) then writeln(j1) else writeln(0); end; end. Re: test2 topic close avtor tup |
|
|