結果

問題 No.1291 小手調べ
ユーザー oreooreo
提出日時 2020-11-22 14:40:53
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,746 bytes
コンパイル時間 2,430 ms
コンパイル使用メモリ 100,748 KB
実行使用メモリ 22,772 KB
最終ジャッジ日時 2023-09-30 22:50:27
合計ジャッジ時間 3,014 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,660 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 54 ms
20,560 KB
testcase_04 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Text;

namespace yukiCoder
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            var sw = new System.IO.StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
            Console.SetOut(sw);

            int N = int.Parse(Console.ReadLine());

            int[] dN = new int[N];

            for (int i = 0; i < N; i++)
            {
                dN[i] = int.Parse(Console.ReadLine());
            }

            for (int j = 0; j < N; j++)
            {
                StringBuilder result = new StringBuilder();

                if (dN[j] == 1)
                {
                    result.Append("1");
                }
                else
                {
                    result.Append("9");
                }
               
                for (int k = 1; k < dN[j]; k++)
                {
                    result.Append("0");
                }

                Console.WriteLine(result);
            }

            //for (int j = 0; j < N; j++)
            //{
            //    decimal min = (decimal)Math.Pow(10, dN[j] - 1);
            //    decimal max = (decimal)(Math.Pow(10, dN[j]));

            //    Console.WriteLine(max - min);
            //}

            Console.Out.Flush();
        }

        #region 入力
        //// 文字列の入力
        //string s = Console.ReadLine();

        //// 整数の入力
        //long n = long.Parse(Console.ReadLine());

        //// 文字列配列の入力
        //string[] inputStrArray = Console.ReadLine().Split(' ');

        //// 整数配列の入力
        //var inputLongArray = Console.ReadLine().Split(' ').Select(i => long.Parse(i)).ToArray();
        #endregion
    }
}
0