Classic
Clean & simple
Crystal
Glassmorphism + Neon
Cyberpunk
Neon glitch art
🚫
违规Action检测
禁止Use右键菜单
⚠️ 此Action已被系统记录
1

DotA

📝 Solutions 🔵 仅限 C++
Problems Description
<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>
Input格式
<p> The input consists of multiple test cases.Each case contain one line with an integer n(1&lt;n≤1000000000). </p>
Output格式
<p> For each test case,output the target's HP's changing process on a single line.The HP values connect with '-' character. </p>
Sample
Sample Input 1
5 21
Sample Output 1
5-6-3-4-2-1 21-22-11-12-6-3-4-2-1
Submit Code
请先Login后Submit

🤖 AI 解题助手

OpenRouter
就绪
👋 你好!我是 AI 解题助手。
我已阅读了这problems题,可以帮你points析思路、提供Code示例。
🔓 完全Free · 无需消耗 Token