Cod sursa(job #1559220)

Utilizator Darius15Darius Pop Darius15 Data 30 decembrie 2015 14:31:05
Problema Next Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.25 kb
#include <fstream>

using namespace std;
ifstream f("next.in");
ofstream g("next.out");
long long n,d,c,nr;
int main()
{
    f>>n>>d;
    if (n%d==0) g<<n;
    else
    {
      c=n/d;
      nr=d*(c+1);
      g<<nr;
    }
    return 0;
}