Cod sursa(job #1000754)
Utilizator | Data | 23 septembrie 2013 18:13:48 | |
---|---|---|---|
Problema | Next | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.24 kb |
#include<iostream>
#include<fstream>
using namespace std;
ifstream f("next.in");
ofstream g("next.out");
int main()
{
long long n,d,rest,m;
f>>n;
f>>d;
rest=n%d;
m=n+(d-rest);
n=m;
g<<n;
return 0;
}