Cod sursa(job #121423)
Utilizator | Data | 8 ianuarie 2008 18:20:31 | |
---|---|---|---|
Problema | Next | Scor | 0 |
Compilator | c | Status | done |
Runda | Arhiva de probleme | Marime | 0.19 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);
}