結果

問題 No.327 アルファベット列
ユーザー bluemeganebluemegane
提出日時 2020-09-09 09:55:39
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 962 bytes
コンパイル時間 1,983 ms
コンパイル使用メモリ 65,312 KB
実行使用メモリ 25,572 KB
最終ジャッジ日時 2023-08-21 03:52:03
合計ジャッジ時間 7,501 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
19,476 KB
testcase_01 AC 56 ms
21,360 KB
testcase_02 AC 56 ms
21,476 KB
testcase_03 AC 56 ms
21,492 KB
testcase_04 WA -
testcase_05 AC 56 ms
23,400 KB
testcase_06 WA -
testcase_07 AC 57 ms
21,472 KB
testcase_08 AC 57 ms
21,360 KB
testcase_09 AC 57 ms
23,364 KB
testcase_10 AC 57 ms
21,492 KB
testcase_11 AC 57 ms
21,368 KB
testcase_12 AC 58 ms
21,440 KB
testcase_13 AC 56 ms
21,336 KB
testcase_14 AC 57 ms
21,364 KB
testcase_15 AC 58 ms
23,468 KB
testcase_16 AC 57 ms
23,348 KB
testcase_17 AC 57 ms
21,492 KB
testcase_18 AC 57 ms
23,548 KB
testcase_19 AC 57 ms
23,408 KB
testcase_20 AC 57 ms
21,376 KB
testcase_21 AC 57 ms
21,504 KB
testcase_22 AC 57 ms
21,304 KB
testcase_23 AC 57 ms
23,392 KB
testcase_24 AC 57 ms
21,432 KB
testcase_25 AC 57 ms
19,356 KB
testcase_26 AC 57 ms
21,356 KB
testcase_27 AC 58 ms
21,428 KB
testcase_28 AC 58 ms
23,420 KB
testcase_29 AC 57 ms
21,292 KB
testcase_30 WA -
testcase_31 AC 57 ms
21,472 KB
testcase_32 AC 58 ms
21,440 KB
testcase_33 AC 57 ms
21,472 KB
testcase_34 AC 57 ms
21,556 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 WA -
testcase_52 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

using System.Linq;
using System.Collections.Generic;
using System;

public class Hello
{
    static void Main()
    {
        var n = long.Parse(Console.ReadLine().Trim());
        var a = getL(n);
        getAns(a);
    }
    static void getAns(List<int> a)
    {
        var ans = "";
        var k = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        ans += k[a[0]];
        for (int i = 1; i < a.Count(); i++)
        {
            var x = a[i] - 1 >= 0 ? a[i] - 1 : a[i] + 25;
            ans += k[x];
        }
        var ans2 = ans.ToCharArray();
        Array.Reverse(ans2);
        Console.WriteLine(new string(ans2));
    }
    static List<int> getL(long n)
    {
        var res = new List<int>();
        var t = n;
        while (true)
        {
            res.Add((int)(t % 26));
            t /= 26;
            if (t < 26)
            {
                if (t != 0) res.Add((int)t);
                break;
            }
        }
        return res;
    }
}
0