Cod sursa(job #1223592)
Utilizator | Data | 28 august 2014 14:06:55 | |
---|---|---|---|
Problema | Next | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.21 kb |
#include <fstream>
using namespace std;
ifstream f("next.in");
ofstream g("next.out");
int n,d,m,k,r;
int main()
{
f>>n>>d;
if(d!=0)
{r=n%d;
m=n+(d-r)%d;}
g<<m;
return 0;
}