|
|
back to boardtest 3 dan qaytvotti xatosi qatta? var a:array[1..10000] of Longint; b:array[1..10000] of string; min,c,n,i,j,k:Longint; s:string; begin read(n); for i:=2 to n-1 do begin if n mod i=0 then j:=i; if (j<>0) and (j<10) then begin k:=k+1; str(j,b[k]); str(trunc(n div j),s); b[k]:=b[k]+s end; end; for i:=1 to k do val(b[i],a[i],c); min:=a[1]; for i:=1 to k do if min>a[i] then min:=a[i]; if min<>0 then write(min); if j=0 then write('-1'); end. |
|
|