Cod sursa(job #215502)

Utilizator matemariaescuMaria Mateescu matemariaescu Data 19 octombrie 2008 10:43:16
Problema Next Scor 0
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.28 kb
program next;
var n,d, m, r:longint;
begin
  assign(input,'next.in'); reset(input);
  assign(output,'next.out'); rewrite(output);
  readln(n);
  readln(d);
  r:= n div d;
  if n mod d =0 then m :=n
  else
  m:= (r+1)*d;

  writeln(d);
  close(input);
  close(output);
end.