Cod sursa(job #988330)
Utilizator | Data | 22 august 2013 15:51:25 | |
---|---|---|---|
Problema | Next | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.3 kb |
#include <fstream>
using namespace std;
ifstream f("next.in");
ofstream g("next.out");
unsigned long long n,d,s;
unsigned long long v[10000000];
int main()
{
f>>n;
f>>d;
s=n/d;
s=s*d;
if (s==n) g<<s;
else g<<s+d;
f.close();
g.close();
return 0;
}