Cod sursa(job #880132)

Utilizator thegamedragon24Shommy Theo thegamedragon24 Data 16 februarie 2013 12:58:43
Problema Next Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.22 kb
#include <iostream>
#include<fstream>
using namespace std;
int main()
{
    long n,d,r=0;
    ifstream f("next.in");
    ofstream g("next.out");
    f>>n>>d;
    if(n%d==0) r=d;
    else
    r=(n/d+1)*d;
    g<<r;
}