Cod sursa(job #43248)
| Utilizator | Data | 29 martie 2007 22:18:02 | |
|---|---|---|---|
| Problema | Next | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.17 kb |
#include<fstream.h>
int main()
{ifstream fin("next.in");
ofstream fout("next.out");
long long long int n,d,r=0;
fin>>n>>d;
r=n%d;
n=n+((d-r)%d);
fout<<n;
return 0;}