Cod sursa(job #1366753)

Utilizator cosminvdpruna stefan cosminvd Data 1 martie 2015 13:33:23
Problema Next Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.25 kb
#include <fstream>
using namespace std;
int main()
{
    ifstream f("next.in");
    ofstream g("next.out");
    unsigned long long n,d,x;
    f>>n>>d;
    if(n%d==0)
    g<<n;
    else
 {
     x=n/d;
     g<<d*x+d;

 }
    return 0;
}