Cod sursa(job #2168151)

Utilizator RazvanChirilaRazvan RazvanChirila Data 14 martie 2018 09:47:05
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,i;
int main()
{
    f>>n>>d;
    if(n!=d && d!=0)
        n=n-n%d+d;
    g<<n;
    f.close();
    g.close();
    return 0;
}