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

VF

📝 Solutions 🔵 仅限 C++
Problems Description
<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>
Input格式
<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>
Output格式
<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>
Sample
Sample Input 1
1
Sample Output 1
10
Submit Code
请先Login后Submit

🤖 AI 解题助手

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