結果

問題 No.2246 1333-like Number
ユーザー bluemeganebluemegane
提出日時 2023-03-18 07:17:23
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 645 bytes
コンパイル時間 4,396 ms
コンパイル使用メモリ 106,984 KB
実行使用メモリ 23,956 KB
最終ジャッジ日時 2023-10-18 17:05:46
合計ジャッジ時間 7,389 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
23,940 KB
testcase_01 AC 23 ms
23,940 KB
testcase_02 AC 23 ms
23,940 KB
testcase_03 AC 22 ms
23,940 KB
testcase_04 AC 107 ms
23,940 KB
testcase_05 AC 78 ms
23,940 KB
testcase_06 AC 86 ms
23,940 KB
testcase_07 AC 91 ms
23,940 KB
testcase_08 AC 47 ms
23,940 KB
testcase_09 AC 80 ms
23,940 KB
testcase_10 AC 44 ms
23,940 KB
testcase_11 AC 73 ms
23,940 KB
testcase_12 AC 28 ms
23,940 KB
testcase_13 AC 39 ms
23,940 KB
testcase_14 AC 50 ms
23,940 KB
testcase_15 AC 49 ms
23,940 KB
testcase_16 AC 66 ms
23,940 KB
testcase_17 AC 90 ms
23,940 KB
testcase_18 AC 37 ms
23,940 KB
testcase_19 AC 43 ms
23,940 KB
testcase_20 AC 103 ms
23,940 KB
testcase_21 AC 84 ms
23,940 KB
testcase_22 AC 70 ms
23,940 KB
testcase_23 AC 107 ms
23,940 KB
testcase_24 AC 102 ms
23,940 KB
testcase_25 AC 24 ms
23,940 KB
testcase_26 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System.Collections.Generic;
using System;

public class Hello
{
    static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        getAns(n);
    }
    static void getAns(int n)
    {
        var a = new List<int>();
        for (int i = 1; i <= 8; i++)
            for (int j = i + 1; j <= 9; j++) a.Add(i * 10 + j);
        if (n <= 36) { Console.WriteLine(a[n - 1]); return; }
        var s = n / 36;
        var r = n % 36;
        if (r - 1 < 0) r += 36;
        Console.Write(a[r - 1]);
        var c = a[r - 1] % 10;
        for (int i = 0; i < s; i++) Console.Write(c);
        Console.WriteLine();
    }
}
0