Cod sursa(job #121424)
| Utilizator | Data | 8 ianuarie 2008 18:21:04 | |
|---|---|---|---|
| Problema | Next | Scor | 10 |
| Compilator | c | Status | done |
| Runda | Arhiva de probleme | Marime | 0.2 kb |
#include <stdio.h>
long long int n,d,r;
int main() {
freopen("next.in","r",stdin);
freopen("next.out","w",stdout);
scanf("%lld",&n);
scanf("%lld",&d);
r = n%d;
n+=(d-r)%d;
printf("%lld",n);
return 0;
}
