Cod sursa(job #222499)
Utilizator | Data | 22 noiembrie 2008 21:28:11 | |
---|---|---|---|
Problema | Next | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.22 kb |
# include <stdio.h>
long long int n,d,r,y;
int main ()
{
freopen ("next.in","r",stdin);
freopen ("next.out","w",stdout);
scanf ("%lli",&n);
scanf ("%lli",&d);
r=n%d;
y=(d-r)%d;
printf ("%lli",n+y);
return 0;
}