Cod sursa(job #123057)
| Utilizator | Data | 14 ianuarie 2008 15:26:38 | |
|---|---|---|---|
| Problema | Next | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.23 kb |
#include <stdio.h>
#include <math.h>
long n, d, rest;
int main() {
freopen("next.in", "r", stdin);
freopen("next.out", "w", stdout);
scanf("%ld%ld", &n, &d);
rest = n % d;
printf("%ld", n + (d - rest));
return 0;
}
