题目描述
<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 </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;"> VF in the point </span><i>S</i><span style="color:#464646;font-family:Simsun;font-size:medium;line-height:22.399999618530273px;background-color:#FFFFFF;"> is an amount of integers from 1 to </span><i>N</i><span style="color:#464646;font-family:Simsun;font-size:medium;line-height:22.399999618530273px;background-color:#FFFFFF;"> that have the sum of digits </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 </span><i>N</i><span style="color:#464646;font-family:Simsun;font-size:medium;line-height:22.399999618530273px;background-color:#FFFFFF;"> = 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
就绪