Cod sursa(job #1001470)
Utilizator | Data | 25 septembrie 2013 08:41:17 | |
---|---|---|---|
Problema | Next | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
#include <iostream>
#include<fstream>
using namespace std;
int main()
{
unsigned long long int m,d,n;
double c;
ifstream f("next.in");
ofstream g("next.out");
f>>n>>d;
c=(double)n/d;
if(c>(int)n/d)
m=(int)(c+1)*d;
else
m=(int)c*d;
g<<m;
return 0;
}