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

Common Board

Now 1118?! SOme Hints Needed
Posted by Locomotive 13 Jan 2003 19:42
PLeeeeeeeease
Posted by Locomotive 14 Jan 2003 15:10
Please...

Var
  ans,a,b,i,p,j       :longint;
  m                   :real;
begin
  readln(a,b);
  m:=a; ans:=1;
  if a=1 then begin writeln(1); halt; end;
  for i:=b downto a do
  begin
    p:=1;
    for j:=2 to i-1 do
     if (i mod j)=0 then
      p:=p+j;
{1}    if p=1 then begin
{2}       writeln(i); halt; end
{~~~~~~~~~~~~~~~~~
!!!!@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@!!!!!!!!
  when i remove these 2 lines i got TL and else i got WA
  anyone know why????
  please give me some tests that its answer be different in 2ways.
!!!!@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@!!!!!!!!
~~~~~~~~~~~~~~~~~~}
    else
      if (p>0) and (p/i<m) then begin
        m:=p/i; ans:=i; end;
  end;
  writeln(ans);
  readln;
end.
Re: PLeeeeeeeease
Posted by Pasha 14 Jan 2003 16:32
Hey Aidin
I have got fastest place!
just 0.01!!!
as yours!!!
Aidin