P2841 A*B Problem

题目描述

给出一个数 $A$ ,你需要给出一个最小的数 $B$ ,使得 $A\times B$ 的结果只含有 $0$ 和 $1$ 。

输入格式

输出格式

说明/提示

样例说明:$6\times 185=1110$。 对于 $30\%$ 的数据,$0