Cod sursa(job #1739468)
Utilizator | Data | 9 august 2016 15:28:06 | |
---|---|---|---|
Problema | Next | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.27 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("next.in");
ofstream fout("next.out");
long long int n,d;
int main()
{
fin >> n >> d;
if(n%d==0)
fout << n;
else
{
fout << n+d-n%d;
}
return 0;
}