Cod sursa(job #71260)
Utilizator | Data | 9 iulie 2007 21:39:21 | |
---|---|---|---|
Problema | Next | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.19 kb |
#include<stdio.h>
int n,d,rez;
int main()
{
freopen("next.in","r",stdin);
freopen("next.out","w",stdout);
scanf("%d%d",&n,&d);
rez=(d-n%d)%d;
printf("%d\n",n+rez);
return 0;
}