結果

問題 No.327 アルファベット列
ユーザー spaciaspacia
提出日時 2016-06-08 17:18:30
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 563 bytes
コンパイル時間 1,970 ms
コンパイル使用メモリ 76,708 KB
実行使用メモリ 55,880 KB
最終ジャッジ日時 2024-04-17 09:49:38
合計ジャッジ時間 9,827 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
54,172 KB
testcase_01 AC 120 ms
54,148 KB
testcase_02 AC 118 ms
54,012 KB
testcase_03 AC 128 ms
54,172 KB
testcase_04 AC 116 ms
52,880 KB
testcase_05 AC 126 ms
54,044 KB
testcase_06 AC 126 ms
53,744 KB
testcase_07 AC 127 ms
54,060 KB
testcase_08 AC 126 ms
54,172 KB
testcase_09 AC 122 ms
54,012 KB
testcase_10 AC 122 ms
54,248 KB
testcase_11 AC 127 ms
54,052 KB
testcase_12 AC 122 ms
53,904 KB
testcase_13 AC 125 ms
53,840 KB
testcase_14 AC 125 ms
54,492 KB
testcase_15 AC 125 ms
54,112 KB
testcase_16 AC 121 ms
54,236 KB
testcase_17 AC 125 ms
54,368 KB
testcase_18 AC 123 ms
54,128 KB
testcase_19 AC 110 ms
52,764 KB
testcase_20 AC 126 ms
54,380 KB
testcase_21 RE -
testcase_22 WA -
testcase_23 RE -
testcase_24 WA -
testcase_25 WA -
testcase_26 RE -
testcase_27 RE -
testcase_28 WA -
testcase_29 RE -
testcase_30 AC 118 ms
53,924 KB
testcase_31 AC 114 ms
52,792 KB
testcase_32 RE -
testcase_33 AC 121 ms
54,148 KB
testcase_34 AC 122 ms
54,152 KB
testcase_35 WA -
testcase_36 WA -
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 WA -
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[] 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"};
		String ret = alp[(int)(n % 26)];

		long d = 26;
		while (n / d >= 1) {
			int i = (int)(n / d) % 26 - 1;
			if (i == -1) i = 25;
			ret = alp[i] + ret;
			n -= d;
			d *= 26;
		}

		return ret;

	}

}
0