Pagini recente » Cod sursa (job #2714620) | Cod sursa (job #461709) | Cod sursa (job #2303651) | Cod sursa (job #2468359) | Cod sursa (job #28933)
Cod sursa(job #28933)
var k,l:text;
i,p,aux,nr:qword;
begin
assign(k,'numere2.in');
reset(k);
assign(l,'numere2.out');
rewrite(l);
read(k,p);
i:=1;
repeat
nr:=0;
aux:=0;
i:=i+1;
if p mod i=0 then begin
aux:=p;
while (aux mod i=0)and(aux<>1) do begin
nr:=nr+1;
aux:=aux div i;
end;
if aux=1 then begin write(l,i,' ',nr); break; end;
end;
until i=p;
close(l);
close(k);
end.