Cod sursa(job #98857)
Utilizator | Data | 10 noiembrie 2007 17:51:13 | |
---|---|---|---|
Problema | Next | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.21 kb |
#include<iostream.h>
#include<fstream.h>
long double n,d;
int a;
int main(void)
{
ifstream f("next.in");
ofstream g("next.out");
f>>n;f>>d;
if(d>n)
g<<d;
else
{
a=(int)n/d;
g<<(a+1)*d;
}
}