Cod sursa(job #38058)

Utilizator RobytzzaIonescu Robert Marius Robytzza Data 25 martie 2007 14:34:21
Problema Next Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.21 kb
#include<fstream.h>
int main(){
ifstream fin("next.in");
ofstream fout("next.out");
long long N,P;
fin>>N>>P;
if (N%P==0)
   fout<<N;
else
   fout<<(N/P+1)*P;
fin.close();
fout.close();
return 0;
}