Cod sursa(job #2168145)

Utilizator RazvanChirilaRazvan RazvanChirila Data 14 martie 2018 09:46:03
Problema Next Scor 0
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");
int 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;
}