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

VF

📝 题解 🔵 仅限 C++
题目描述
<span style="color:#464646;font-family:Simsun;font-size:medium;line-height:22.399999618530273px;background-color:#FFFFFF;">Vasya is the beginning mathematician. He decided to make an important contribution to the science and to become famous all over the world. But how can he do that if the most interesting facts such as Pythagor’s theorem are already proved? Correct! He is to think out something his own, original. So he thought out the Theory of Vasya’s Functions. Vasya’s Functions (VF) are rather simple: the value of the&nbsp;</span><i>N</i><span style="color:#464646;font-family:Simsun;line-height:22.399999618530273px;background-color:#FFFFFF;vertical-align:baseline;">th</span><span style="color:#464646;font-family:Simsun;font-size:medium;line-height:22.399999618530273px;background-color:#FFFFFF;">&nbsp;VF in the point&nbsp;</span><i>S</i><span style="color:#464646;font-family:Simsun;font-size:medium;line-height:22.399999618530273px;background-color:#FFFFFF;">&nbsp;is an amount of integers from 1 to&nbsp;</span><i>N</i><span style="color:#464646;font-family:Simsun;font-size:medium;line-height:22.399999618530273px;background-color:#FFFFFF;">&nbsp;that have the sum of digits&nbsp;</span><i>S</i><span style="color:#464646;font-family:Simsun;font-size:medium;line-height:22.399999618530273px;background-color:#FFFFFF;">. You seem to be great programmers, so Vasya gave you a task to find the milliard VF value (i.e. the VF with&nbsp;</span><i>N</i><span style="color:#464646;font-family:Simsun;font-size:medium;line-height:22.399999618530273px;background-color:#FFFFFF;">&nbsp;= 10</span><span style="color:#464646;font-family:Simsun;line-height:22.399999618530273px;background-color:#FFFFFF;vertical-align:baseline;">9</span><span style="color:#464646;font-family:Simsun;font-size:medium;line-height:22.399999618530273px;background-color:#FFFFFF;">) because Vasya himself won’t cope with the task. Can you solve the problem?</span>
输入格式
<span style="color:#464646;font-family:Tahoma, Arial, sans-serif, simsun;font-size:14px;line-height:21px;background-color:#FFFFFF;">There are multiple test cases.</span><br /> <span style="color:#464646;font-family:Tahoma, Arial, sans-serif, simsun;font-size:14px;line-height:21px;background-color:#FFFFFF;">Integer S (1 ≤ S ≤ 81).</span>
输出格式
<span style="color:#464646;font-family:Tahoma, Arial, sans-serif, simsun;font-size:14px;line-height:21px;background-color:#FFFFFF;">The milliard VF value in the point S.</span>
样例
样例输入 1
1
样例输出 1
10
提交代码
请先登录后提交

🤖 AI 解题助手

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