Cod sursa(job #38114)
Utilizator | Data | 25 martie 2007 14:49:45 | |
---|---|---|---|
Problema | Next | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.22 kb |
#include<fstream.h>
int main()
{ifstream fin("next.in");
long long int n,d;
fin>>n>>d;
fin.close();
if(n%d==0){cout<<n;}
if(n%d!=0){while(n%d!=0)
{n++;}}
ofstream fout("next.out");
fout<<n;
fout.close();
return 0;}