Cod sursa(job #1618280)

Utilizator razvandRazvan Dumitru razvand Data 27 februarie 2016 19:17:43
Problema Next Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.27 kb
#include <iostream>
#include <fstream>

using namespace std;

ifstream in("next.in");
ofstream out("next.out");

int main() {
    long long n,d;

    in >> n >> d;

    if(n%d == 0)
        out << d*(n/d);
    else
        out << d*(n/d+1);

    return 0;
}