Cod sursa(job #50941)
Utilizator | Data | 9 aprilie 2007 14:12:46 | |
---|---|---|---|
Problema | Next | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.26 kb |
#include<fstream>
using namespace std;
int main(){
ifstream a("next.in");
ofstream b("next.out");
unsigned long int n;
unsigned long int d;
a>>n;
a>>d;
n=n+d-(n-1)%d+1;
b<<n;
a.close();
b.close();
return 0;
}