Pagini recente » Cod sursa (job #462000) | Istoria paginii utilizator/unibucdorosganeanema | Cod sursa (job #2840733) | Cod sursa (job #1616984) | Cod sursa (job #3032595)
#include <fstream>
using namespace std;
string file = "multiplu";
ifstream cin (file + ".in");
ofstream cout (file + ".out");
int m, gasit;
void bkt(long long x = 0, int l = 0)
{
if (l < 18 && !gasit)
{
bkt(x*10,l+1);
bkt(x*10+1,l+1);
}
else if (x % m == 0 && x && !gasit)
{
cout << x;
gasit = 1;
}
}
int main()
{
int a,b;
cin >> a >> b;
m = a * b;
bkt();
}