結果

問題 No.327 アルファベット列
ユーザー spaciaspacia
提出日時 2016-06-03 12:35:59
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 561 bytes
コンパイル時間 2,179 ms
コンパイル使用メモリ 76,772 KB
実行使用メモリ 56,712 KB
最終ジャッジ日時 2024-04-16 23:29:23
合計ジャッジ時間 10,416 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
41,024 KB
testcase_01 AC 124 ms
41,360 KB
testcase_02 AC 118 ms
41,428 KB
testcase_03 AC 127 ms
41,228 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 WA -
testcase_26 RE -
testcase_27 RE -
testcase_28 WA -
testcase_29 RE -
testcase_30 WA -
testcase_31 WA -
testcase_32 RE -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 RE -
testcase_37 RE -
testcase_38 RE -
testcase_39 RE -
testcase_40 RE -
testcase_41 RE -
testcase_42 RE -
testcase_43 RE -
testcase_44 RE -
testcase_45 WA -
testcase_46 RE -
testcase_47 RE -
testcase_48 WA -
testcase_49 RE -
testcase_50 RE -
testcase_51 RE -
testcase_52 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);

		System.out.println(solve(sc.nextLong()));

		sc.close();
	}

	public static String solve (long n) {
		String ret = "";
		String[] alp = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
		if (n < alp.length) return alp[(int)n % alp.length];
		while (n >= alp.length) {
			ret = alp[(int)n % alp.length] + ret;
			n /= alp.length;
		}
		return alp[(int)n - 1] + ret;
	}

}
0