Cod sursa(job #291181)

Utilizator codrinCodrin LACHE codrin Data 29 martie 2009 14:48:49
Problema Next Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.26 kb
#include<fstream.h>

int main()
{
 ifstream fin("next.in");
 ofstream fout("next.out");
 long long n,d,aux;
 fin>>n>>d;
 fin.close();
 if(n%d==0)
	fout<<n<<"\n";
 else
	{
		aux=n/d;
		aux+=1;
		aux*=d;
		fout<<aux<<"\n";
	}
 fout.close();
return 0;
}