Cod sursa(job #121422)
| Utilizator | Data | 8 ianuarie 2008 18:19:04 | |
|---|---|---|---|
| Problema | Next | Scor | 0 |
| 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);
}
