Cod sursa(job #43246)

Utilizator maleficpalade andrei malefic Data 29 martie 2007 22:16:56
Problema Next Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.16 kb
#include<fstream.h>
int main()
{ifstream fin("next.in");
ofstream fout("next.out");
long long n,d,r=0;
fin>>n>>d;
r=n%d;
n=n+((d-r)%d);
fout<<n;
return 0;}