CF1530A Binary Decimal
题目描述
有一种数,叫做 `binary decimal`。这种数是十进制,但是每一位只能是 $0$ 或 $1$。
给你一个数,请问:至少多少个 `binary decimal` 之和等于这个数?一个 `binary decimal` 可以使用多次。
输入格式
第一行一个数 $t$($1\le t\le1000$),代表测试样例数量。
接下来 $t$ 行,每行一个数 $n$($1\le n\le10^9$),代表给出的数。
输出格式
对于每个测试样例,输出一行,代表问题的答案?
Translated by [dengzijun](https://www.luogu.com.cn/user/387836)
说明/提示
In the first test case, $ 121 $ can be represented as $ 121 = 110 + 11 $ or $ 121 = 111 + 10 $ .
In the second test case, $ 5 $ can be represented as $ 5 = 1 + 1 + 1 + 1 + 1 $ .
In the third test case, $ 1\,000\,000\,000 $ is a binary decimal itself, thus the answer is $ 1 $ .