結果

問題 No.327 アルファベット列
ユーザー jp_stejp_ste
提出日時 2016-05-13 16:23:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 169 ms / 2,000 ms
コード長 434 bytes
コンパイル時間 2,348 ms
コンパイル使用メモリ 77,044 KB
実行使用メモリ 55,164 KB
最終ジャッジ日時 2024-04-16 08:23:03
合計ジャッジ時間 12,199 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 158 ms
54,804 KB
testcase_01 AC 169 ms
54,804 KB
testcase_02 AC 159 ms
54,776 KB
testcase_03 AC 164 ms
54,820 KB
testcase_04 AC 159 ms
54,940 KB
testcase_05 AC 163 ms
54,916 KB
testcase_06 AC 160 ms
54,788 KB
testcase_07 AC 160 ms
55,032 KB
testcase_08 AC 165 ms
54,904 KB
testcase_09 AC 163 ms
54,952 KB
testcase_10 AC 157 ms
54,648 KB
testcase_11 AC 162 ms
54,944 KB
testcase_12 AC 158 ms
54,688 KB
testcase_13 AC 159 ms
54,716 KB
testcase_14 AC 163 ms
55,164 KB
testcase_15 AC 159 ms
54,688 KB
testcase_16 AC 162 ms
54,620 KB
testcase_17 AC 157 ms
54,928 KB
testcase_18 AC 160 ms
54,856 KB
testcase_19 AC 161 ms
55,072 KB
testcase_20 AC 163 ms
54,872 KB
testcase_21 AC 159 ms
54,812 KB
testcase_22 AC 159 ms
54,876 KB
testcase_23 AC 156 ms
54,672 KB
testcase_24 AC 157 ms
54,916 KB
testcase_25 AC 161 ms
54,832 KB
testcase_26 AC 160 ms
54,680 KB
testcase_27 AC 159 ms
54,972 KB
testcase_28 AC 158 ms
54,820 KB
testcase_29 AC 158 ms
54,972 KB
testcase_30 AC 156 ms
54,948 KB
testcase_31 AC 160 ms
54,724 KB
testcase_32 AC 161 ms
55,052 KB
testcase_33 AC 156 ms
54,956 KB
testcase_34 AC 156 ms
55,080 KB
testcase_35 AC 155 ms
54,960 KB
testcase_36 AC 163 ms
55,020 KB
testcase_37 AC 164 ms
54,536 KB
testcase_38 AC 157 ms
54,964 KB
testcase_39 AC 161 ms
54,504 KB
testcase_40 AC 158 ms
54,972 KB
testcase_41 AC 158 ms
54,612 KB
testcase_42 AC 161 ms
55,024 KB
testcase_43 AC 159 ms
54,648 KB
testcase_44 AC 158 ms
54,956 KB
testcase_45 AC 158 ms
54,836 KB
testcase_46 AC 157 ms
54,768 KB
testcase_47 AC 160 ms
54,944 KB
testcase_48 AC 163 ms
55,084 KB
testcase_49 AC 162 ms
55,068 KB
testcase_50 AC 160 ms
54,928 KB
testcase_51 AC 158 ms
54,928 KB
testcase_52 AC 160 ms
54,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner scan = new Scanner(System.in)) {
            long n = Long.parseLong(scan.next());
            n++;
            String ans = "";
            while(n > 0) {
                n--;
                ans = (char)(n % 26 + 'A') + ans;
                n /= 26;
            }
            System.out.println(ans);
        }
    }
}
0