Problem:
Score : 500 points

Problem Statement

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

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

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

Constraints

1 \leq K

The K-th smallest Snuke number is not greater than 10^{15}.

Input

Input is given from Standard Input in the following format:

K

Output

Print K lines. The i-th line should contain the i-th smallest Snuke number.

Sample Input 1

10

Sample Output 1

1
2
3
4
5
6
7
8
9
19

Solution in C# (.NET Core 3.1.201) (judge verdict: Wrong Answer)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            //値を取得する
            int decimalNum = int.Parse(Console.ReadLine());

            //数値型の配列を宣言
            decimal[] decimalArray = new decimal[decimalNum];

            //変数を宣言
            //元の数
            decimal decimalOri = 0;

            //比較用
            decimal decimalComp = 0;



            //カウント用の変数
            int decimalCount = 0;

            //while文章　取得した値まで
            while(decimalCount!=decimalNum)
            {
                //元の変数に１加算する
                decimalOri++;

                //比較用の変数に元の変数に1加算する
                decimalComp = decimalOri + 1;

                //計算する

                //--------------------------------
                //元の変数
                decimal decimalSumOri = 0;
                decimal decimalOriForSum = decimalOri;
                for (decimal i = 0; i <= 5; i++)
                {
                    decimalSumOri += decimalOriForSum % 10;
                    decimalOriForSum /= 10;
                }

                //--------------------------------

                //--------------------------------
                //比較用
                decimal decimalSumComp = 0;
                decimal decimalCompForSum = decimalComp;
                for (decimal i = 0; i <= 5; i++)
                {
                    decimalSumComp += decimalCompForSum % 10;
                    decimalCompForSum /= 10;
                }

                //--------------------------------


                //もし条件に満たしているなら
                if(decimalOri/ decimalSumOri<=decimalComp/decimalSumComp)
                {
                    //カウント用の変数+1
                    decimalCount++;

                    //数値型の配列[カウント用変数-1]
                    decimalArray[decimalCount - 1] = decimalOri;
                }


            }

            foreach (decimal a in decimalArray)
            {
                Console.WriteLine(a); 
            }

        }
    }

    
}