Cod sursa(job #1572112)

Utilizator DaniellDa Vinci Daniell Data 18 ianuarie 2016 19:24:06
Problema Next Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.23 kb
#include <fstream>

using namespace std;

int main()
{ifstream fin("next.in");
ofstream fout("next.out");
long long n,d;bool b=1;
fin>>n>>d;
while(b!=0){
    if(n%d==0){b=0;fout<<n;}
    else n++;
}

    return 0;
}