|
|
вернуться в форумhelp me pleas??? i can not get AC!! type c=record d:longint; h:real; end; var sol,gam,i,j,k,l,m,n,b:longint; a:array [1..10000] of c; min:real; procedure readdata; begin readln (n,m); end; procedure check; begin if n=1 then begin writeln (0); halt; end; end; procedure solve; begin for i:=n to m do begin k:=i div 2; for j:=1 to k do if i mod j = 0 then gam:=gam+j; inc (b); a[b].d:=i; a[b].h:=gam/i; gam:=0; if i>=m then break; end; min:=a[1].h; for i:=1 to b do if min>a[i].h then begin min:=a[i].h; sol:=a[i].d; end; end; procedure print; begin writeln (sol); end; begin readdata; check; solve; print; end. |
|
|