Cod sursa(job #1572135)

Utilizator DaniellDa Vinci Daniell Data 18 ianuarie 2016 19:31:14
Problema Next Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.24 kb
#include <fstream>

using namespace std;

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

    return 0;
}