Cod sursa(job #2169014)

Utilizator RazvanChirilaRazvan RazvanChirila Data 14 martie 2018 13:05:58
Problema Next Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.24 kb
#include <bits/stdc++.h>
using namespace std;
ifstream f("next.in");
ofstream g("next.out");
long long n,d;
int main()
{
    f>>n>>d;
    if(n%d!=0 && d!=0)
        n=n-(n%d)+d;
    g<<n;
    f.close();
    g.close();
    return 0;
}