結果

問題 No.756 チャンパーノウン定数 (1)
ユーザー CroweaCrowea
提出日時 2019-01-25 14:27:18
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 50 ms / 2,000 ms
コード長 483 bytes
コンパイル時間 875 ms
コンパイル使用メモリ 61,156 KB
実行使用メモリ 22,804 KB
最終ジャッジ日時 2023-10-14 09:48:38
合計ジャッジ時間 3,044 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
20,704 KB
testcase_01 AC 50 ms
20,648 KB
testcase_02 AC 50 ms
20,736 KB
testcase_03 AC 49 ms
20,716 KB
testcase_04 AC 50 ms
20,640 KB
testcase_05 AC 47 ms
20,736 KB
testcase_06 AC 48 ms
20,688 KB
testcase_07 AC 48 ms
20,732 KB
testcase_08 AC 46 ms
22,696 KB
testcase_09 AC 46 ms
20,708 KB
testcase_10 AC 46 ms
20,548 KB
testcase_11 AC 46 ms
20,680 KB
testcase_12 AC 47 ms
20,652 KB
testcase_13 AC 50 ms
20,680 KB
testcase_14 AC 47 ms
20,712 KB
testcase_15 AC 49 ms
20,708 KB
testcase_16 AC 48 ms
20,748 KB
testcase_17 AC 49 ms
20,744 KB
testcase_18 AC 48 ms
20,828 KB
testcase_19 AC 47 ms
22,804 KB
testcase_20 AC 46 ms
20,552 KB
testcase_21 AC 49 ms
22,760 KB
testcase_22 AC 46 ms
20,660 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Text;

public static class Program
{
    const int MAX = 100;
    static void Main(string[] args)
    {
        int N = int.Parse(Console.ReadLine());
        var sb = new StringBuilder();
        int num = 0;

        while (sb.Length <= MAX)
        {
            if (sb.Length >= MAX) break;
            sb.Append(num + 1);
            num++;
        }

        string C_10 = sb.ToString();
        Console.WriteLine(C_10[N-1]);
    }
} // class Program
0