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 1355. Bald Spot Revisited

test2
Posted by Lupoplon 17 Apr 2005 17:49
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
Posted by Lupoplon 17 Apr 2005 18:41
topic close
avtor tup