#P9435. 『XYGOI round1』三个数
『XYGOI round1』三个数
Problem Description
MX has a set containing numbers. You need to construct a set that contains only non-negative integers (with no repeated elements), such that every number in can be obtained by adding together at least different numbers from this set. Find the minimum number of elements this set must contain.
Input Format
This problem contains multiple groups of testdata.
The first line contains an integer , the number of test cases.
The next lines each contain an integer .
Output Format
Output lines. Each line outputs an integer , meaning the minimum number of elements the set should contain.
1
4
4
5
3
18
999
9999
9999999999
3
6
12
15
35
Hint
Sample 1 Explanation:
The set elements can be .
Constraints:
This problem uses bundled tests.
For all testdata, it is guaranteed that and .
| Subtask | Score | ||
|---|---|---|---|
| 0 | 5 | ||
| 1 | 10 | ||
| 2 | 25 | ||
| 3 | 30 | ||
| 4 |
Translated by ChatGPT 5