Cod sursa(job #90327)
Utilizator | Data | 9 octombrie 2007 09:21:27 | |
---|---|---|---|
Problema | Next | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.26 kb |
#include<stdio.h>
int main(){
int n,d;
freopen("next.in","r",stdin);
freopen("next.out","w",stdout);
scanf("%d",&n);
scanf("%d",&d);
if(n%d==0)
printf("%d",n);
else
printf("%d\n",(n/d+1)*d);
fclose(stdin);
fclose(stdout);
return 0;
}