Cod sursa(job #2086698)

Utilizator munteanubodiMunteanu Cosmin-Bogdan munteanubodi Data 12 decembrie 2017 13:00:21
Problema Next Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.27 kb
#include <bits/stdc++.h>
using namespace std;
ifstream f("next.in");
ofstream g("next.out");

int main()
{
    unsigned long long n,d,nr=0,ok=0;
    f>>n>>d;
    while(ok==0)
    {
        nr++;
        d*=nr;
        if(n<=d){g<<d;ok=1;}
    }
    return 0;
}