Cod sursa(job #177834)
Utilizator | Data | 13 aprilie 2008 17:29:40 | |
---|---|---|---|
Problema | Next | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.25 kb |
# include <stdio.h>
long int n,d,m,x;
int main ()
{
freopen ("next.in","r",stdin);
freopen ("next.out","w",stdout);
scanf ("%li",&n);
scanf ("%li",&d);
for (m=0;m<=2000000;m++)
if (m>=n && m%d==0)
{
printf ("%li",m);
break;
}
return 0;
}