{"problem":{"name":"B. Perfect Number","description":{"content":"We consider a positive integer perfect, if and only if the sum of its digits is exactly $10$. Given a positive integer $k$, your task is to find the $k$\\-th smallest perfect positive integer.","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF919B"},"statements":[{"statement_type":"Markdown","content":"We consider a positive integer perfect, if and only if the sum of its digits is exactly $10$. Given a positive integer $k$, your task is to find the $k$\\-th smallest perfect positive integer.\n\n## Input\n\nA single line with a positive integer $k$ ($1 \\leq k \\leq 10\\,000$).\n\n## Output\n\nA single number, denoting the $k$\\-th smallest perfect integer.\n\n[samples]\n\n## Note\n\nThe first perfect integer is $19$ and the second one is $28$.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"我们称一个正整数为“完美”的，当且仅当它的各位数字之和恰好为 $10$。给定一个正整数 $k$，你的任务是找出第 $k$ 小的完美正整数。\n\n一行包含一个正整数 $k$（$1 lt.eq k lt.eq 10 thin 000$）。\n\n输出一个数，表示第 $k$ 小的完美整数。\n\n第一个完美整数是 $19$，第二个是 $28$。\n\n## Input\n\n一行包含一个正整数 $k$（$1 lt.eq k lt.eq 10 thin 000$）。\n\n## Output\n\n输出一个数，表示第 $k$ 小的完美整数。\n\n[samples]\n\n## Note\n\n第一个完美整数是 $19$，第二个是 $28$。","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ S = \\{ n \\in \\mathbb{Z}^+ \\mid \\text{sum of digits of } n = 10 \\} $.  \nOrder $ S $ in increasing order: $ s_1 < s_2 < s_3 < \\cdots $.\n\n**Constraints**  \n$ 1 \\leq k \\leq 10{,}000 $\n\n**Objective**  \nFind $ s_k $, the $ k $-th smallest element of $ S $.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF919B","tags":["binary search","brute force","dp","implementation","number theory"],"sample_group":[["1","19"],["2","28"]],"created_at":"2026-03-03 11:00:39"}}