Cod sursa(job #1559219)
| Utilizator | Data | 30 decembrie 2015 14:30:26 | |
|---|---|---|---|
| Problema | Next | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.24 kb |
#include <fstream>
using namespace std;
ifstream f("next.in");
ofstream g("next.out");
long long n,d;
int main()
{
f>>n>>d;
if (n%d==0) g<<n;
else
{
c=n/d;
nr=d*(c+1);
g<<nr;
}
return 0;
}
