#include<iostream>
#include<queue>
using namespace std;
int x(
int n,
int m)
{
int temp = n*m;
while (temp)
{
if (temp %
10 >=
2)
return 0;
temp=temp/
10;
}
return 1;
}
int main711()
{
int n;
while (
cin >> n)
{
int m;
for (m =
1; m++;)
if (x(n, m))
{
cout << n <<
"," << m*n << endl;
break;
}
}
return 0;
}
int main()
{
int n;
while (
cin >> n)
{
queue<int>a;
a.push(
1);
while (!a.empty())
{
int temp = a.front();
a.pop();
if (temp%n ==
0)
{
cout << n <<
"," << temp << endl;
break;
}
a.push(temp *
10);
a.push(temp *
10+
1);
}
}
return 0;
}
转载请注明原文地址: https://www.6miu.com/read-70644.html