经典简约
清爽简洁,回归本真
液态水晶
毛玻璃+霓虹光带
赛博朋克
霓虹故障艺术风
🚫
违规操作检测
禁止使用右键菜单
⚠️ 此操作已被系统记录
1

DotA

📝 题解 🔵 仅限 C++
题目描述
<p style="text-align:center;"> <img src="http://tk.hustoj.com/upload/pimg2147_1.png" width="320" height="240" alt="" /> </p> <p> DotA(Defence of the Ancients) is very popular in Zhejiang University.Now a new hero appears in DotA.This hero has a miraculous skill.If the target's HP n is an even number,then it will be cut in half after skill-using.Otherwise the targe's HP will plus one after skill-using.Given a target's HP,we want to decrease the target's HP from n to 1 only with this new skill. </p>
输入格式
<p> The input consists of multiple test cases.Each case contain one line with an integer n(1&lt;n≤1000000000). </p>
输出格式
<p> For each test case,output the target's HP's changing process on a single line.The HP values connect with '-' character. </p>
样例
样例输入 1
5 21
样例输出 1
5-6-3-4-2-1 21-22-11-12-6-3-4-2-1
提交代码
请先登录后提交

🤖 AI 解题助手

DeepSeek
就绪
👋 你好!我是 AI 解题助手。
我已阅读了这道题,可以帮你分析思路、提供代码示例。
⚠️ 请先登录后使用