Cod sursa(job #38054)
Utilizator | Data | 25 martie 2007 14:33:37 | |
---|---|---|---|
Problema | Next | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.26 kb |
#include<iostream.h>
int main()
{//ifstream fin("next.in");
long long int n,m,d;
cin>>n>>d;
//fin.close();
if(n%d==0){m=n;}
else
{
while(m%d!=0)
{
n=n+1;
m=n;
}
}
//ofstream fout("next.out");
cout<<m;
return 0;}