当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5703:Desert

题目描述
A tourist gets lost in the desert with n liters of water. He drinks positive integer units of water each day.

Write a program to calculate how many different ways the tourist can drink up the water.
输入解释
The first line contains the number of test cases $T(T\leq10)$.
Next $T$ lines contain the number $n(1\leq n\leq1000000)$ for each test case.
输出解释
Output consists of $T$ lines.
Each line contains the binary number which represents number of different ways to finish up the water specified in the test case.
输入样例
1
3
输出样例
100

提示
3 liters of water can be comsumed in four different ways show in the following.  
1. 1 1 1  
2. 1 2  
3. 2 1  
4. 3  

If we write 4 in binary, it's 100.
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-5703

最后修改于 2020-10-25T23:24:56+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 65535/32768K(Java/Others)