#arc099b. D - Snuke Numbers

D - Snuke Numbers

Score : 500500 points

问题描述

S(n)S(n) 表示整数 nn 在十进制表示下的各位数字之和。例如,S(123)=1+2+3=6S(123) = 1 + 2 + 3 = 6

当对于所有大于 nn 的正整数 mm,满足 nS(n)mS(m)\frac{n}{S(n)} \leq \frac{m}{S(m)} 时,我们称整数 nnSnuke 数

给定一个整数 KK,请列出前 KK 小的 Snuke 数。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

Let S(n)S(n) denote the sum of the digits in the decimal notation of nn. For example, S(123)=1+2+3=6S(123) = 1 + 2 + 3 = 6.

We will call an integer nn a Snuke number when, for all positive integers mm such that m>nm > n, nS(n)mS(m)\frac{n}{S(n)} \leq \frac{m}{S(m)} holds.

Given an integer KK, list the KK smallest Snuke numbers.

Constraints

  • 1K1 \leq K
  • The KK-th smallest Snuke number is not greater than 101510^{15}.

Input

Input is given from Standard Input in the following format:

KK

Output

Print KK lines. The ii-th line should contain the ii-th smallest Snuke number.

Sample Input 1

10

Sample Output 1

1
2
3
4
5
6
7
8
9
19

update @ 2024/3/10 17:17:45

}