Cod sursa(job #238985)

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