Cod sursa(job #1171870)

Utilizator aurelian121bonte aurelian aurelian121 Data 16 aprilie 2014 15:14:45
Problema Next Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.31 kb
/*
 * app.cpp
 *
 *  Created on: Apr 16, 2014
 *      Author: Aurelian
 */


#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("next.in");
ofstream fout("next.out");

long n,d;
int main(){
	fin>>n;
	fin>>d;
	if(n%d==0)
		fout<<n;
	else
		fout<<n+d-n%d;
	return 0;
}