Cod sursa(job #410086)

Utilizator cristibestTodica Lorin Cristian cristibest Data 4 martie 2010 08:56:37
Problema Next Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.25 kb
#include<iostream>
#include<fstream>
using namespace std;
ofstream fout("next.out");
ifstream fin("next.in");
double long long n,m,d;
int main ()
{
	fin>>n>>d;
	m=n;
	while(m%d)
		m++;
	fout<<m;
	fin.close();
	fout.close();
	return 0;
}