結果

問題 No.327 アルファベット列
ユーザー YamaKasaYamaKasa
提出日時 2018-09-15 11:03:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 421 bytes
コンパイル時間 4,029 ms
コンパイル使用メモリ 71,836 KB
実行使用メモリ 56,360 KB
最終ジャッジ日時 2023-09-22 23:51:20
合計ジャッジ時間 13,127 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,784 KB
testcase_01 AC 122 ms
55,972 KB
testcase_02 AC 122 ms
55,772 KB
testcase_03 AC 123 ms
55,616 KB
testcase_04 AC 122 ms
55,732 KB
testcase_05 AC 124 ms
55,860 KB
testcase_06 AC 123 ms
55,704 KB
testcase_07 AC 122 ms
55,768 KB
testcase_08 AC 123 ms
55,628 KB
testcase_09 AC 123 ms
55,832 KB
testcase_10 AC 122 ms
55,776 KB
testcase_11 AC 124 ms
55,640 KB
testcase_12 AC 122 ms
56,016 KB
testcase_13 AC 121 ms
55,296 KB
testcase_14 AC 123 ms
56,120 KB
testcase_15 AC 125 ms
55,956 KB
testcase_16 AC 121 ms
56,000 KB
testcase_17 AC 122 ms
56,308 KB
testcase_18 AC 122 ms
56,144 KB
testcase_19 AC 123 ms
56,304 KB
testcase_20 AC 122 ms
55,396 KB
testcase_21 AC 123 ms
56,092 KB
testcase_22 AC 123 ms
55,728 KB
testcase_23 AC 121 ms
55,732 KB
testcase_24 AC 123 ms
55,836 KB
testcase_25 AC 127 ms
55,608 KB
testcase_26 AC 124 ms
55,896 KB
testcase_27 AC 123 ms
55,396 KB
testcase_28 AC 123 ms
55,400 KB
testcase_29 AC 121 ms
56,176 KB
testcase_30 AC 122 ms
54,048 KB
testcase_31 AC 123 ms
55,648 KB
testcase_32 AC 122 ms
55,684 KB
testcase_33 AC 122 ms
55,580 KB
testcase_34 AC 125 ms
56,024 KB
testcase_35 AC 123 ms
56,080 KB
testcase_36 AC 122 ms
55,940 KB
testcase_37 AC 124 ms
55,860 KB
testcase_38 AC 125 ms
55,984 KB
testcase_39 AC 123 ms
55,916 KB
testcase_40 AC 121 ms
55,836 KB
testcase_41 AC 121 ms
55,504 KB
testcase_42 AC 123 ms
56,024 KB
testcase_43 AC 124 ms
56,052 KB
testcase_44 AC 124 ms
56,360 KB
testcase_45 AC 123 ms
55,956 KB
testcase_46 AC 123 ms
55,944 KB
testcase_47 AC 122 ms
55,660 KB
testcase_48 AC 120 ms
55,676 KB
testcase_49 AC 121 ms
56,184 KB
testcase_50 AC 122 ms
56,128 KB
testcase_51 AC 122 ms
55,784 KB
testcase_52 AC 124 ms
55,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long n = scan.nextLong();
		scan.close();
		StringBuilder sb = new StringBuilder();
		long k = n % 26;
		sb.append((char)(k + 'A'));
		n = n / 26;
		while(n > 0) {
			n--;
			k = n % 26;
			sb.append((char)(k + 'A'));
			n = n / 26;
		}
		System.out.println(sb.reverse().toString());
	}
}
0