Cod sursa(job #238986)

Utilizator MihaiBunBunget Mihai MihaiBun Data 3 ianuarie 2009 19:48:05
Problema Next Scor 0
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.25 kb
program nnn;
var f:text;
    i,n,d,m:int64;
begin
  assign(f,'next.in');
  reset(f);
  read(f,n,d);
  i:=0;
  repeat
    i:=i+1;
    m:=i*d;
  until m>=n;
  close(f);
  assign(f,'next.out');
  rewrite(f);
  write(f,m);
  close(f)
end.