Cod sursa(job #410080)
| Utilizator | Data | 4 martie 2010 08:51:52 | |
|---|---|---|---|
| Problema | Next | Scor | 10 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.24 kb |
#include<iostream>
#include<fstream>
using namespace std;
ofstream fout("next.out");
ifstream fin("next.in");
long long n,m,d;
int main ()
{
fin>>n>>d;
m=n;
while(m%d)
m++;
fout<<m;
fin.close();
fout.close();
return 0;
}
