Cod sursa(job #1001471)

Utilizator ionut95Mihai Alexandru ionut95 Data 25 septembrie 2013 08:41:22
Problema Next Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.29 kb
#include <iostream>
#include<fstream>
using namespace std;
ifstream f("next.in");
ofstream g("next.out");
int main()
{
    long long n,d,s;
    f>>n;
    f>>d;
    s=n/d;
    s=s*d;
    if(s==n)
        g<<s;
    else
    {
       s=s+d;
       g<<s;
    }

    return 0;
}