Cod sursa(job #39216)
Utilizator | Data | 26 martie 2007 15:28:25 | |
---|---|---|---|
Problema | Next | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.35 kb |
#include<fstream.h>
long long n, m, d;
void citire()
{
ifstream in("next.in");
in>>n;
in>>d;
in.close();
}
void prelucrare()
{
long x, y;
ofstream out("next.out");
x=n/d;
if (x*d==n) out<<n;
else { y=(x+1)*d;
out<<y;
}
out.close();
}
int main()
{
citire();
prelucrare();
return 0;
}