結果

問題 No.327 アルファベット列
ユーザー AoiroFukurouAoiroFukurou
提出日時 2015-12-25 21:28:27
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 665 bytes
コンパイル時間 5,849 ms
コンパイル使用メモリ 76,384 KB
実行使用メモリ 57,864 KB
最終ジャッジ日時 2023-10-19 03:49:52
合計ジャッジ時間 12,481 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 WA -
testcase_02 AC 139 ms
57,128 KB
testcase_03 AC 136 ms
57,560 KB
testcase_04 RE -
testcase_05 AC 137 ms
57,640 KB
testcase_06 RE -
testcase_07 AC 134 ms
57,544 KB
testcase_08 AC 134 ms
57,716 KB
testcase_09 AC 134 ms
57,420 KB
testcase_10 AC 135 ms
57,416 KB
testcase_11 AC 137 ms
57,156 KB
testcase_12 AC 137 ms
57,632 KB
testcase_13 AC 137 ms
57,708 KB
testcase_14 AC 140 ms
57,124 KB
testcase_15 AC 140 ms
57,368 KB
testcase_16 AC 136 ms
57,112 KB
testcase_17 AC 137 ms
57,084 KB
testcase_18 AC 135 ms
55,704 KB
testcase_19 AC 138 ms
57,376 KB
testcase_20 AC 136 ms
57,500 KB
testcase_21 AC 134 ms
57,448 KB
testcase_22 AC 136 ms
57,652 KB
testcase_23 AC 134 ms
57,716 KB
testcase_24 AC 137 ms
57,572 KB
testcase_25 AC 133 ms
57,420 KB
testcase_26 AC 134 ms
57,368 KB
testcase_27 AC 135 ms
57,616 KB
testcase_28 AC 135 ms
57,380 KB
testcase_29 AC 134 ms
57,680 KB
testcase_30 RE -
testcase_31 AC 134 ms
57,372 KB
testcase_32 AC 134 ms
57,400 KB
testcase_33 AC 135 ms
57,576 KB
testcase_34 AC 134 ms
55,576 KB
testcase_35 RE -
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 RE -
testcase_46 RE -
testcase_47 RE -
testcase_48 RE -
testcase_49 RE -
testcase_50 RE -
testcase_51 RE -
testcase_52 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No_327 {
public static void main(String[] args) {
	String[] Alf = {"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"};
	long[] L = new long[26];
	Scanner sc = new Scanner(System.in);
	long N = sc.nextLong();
	sc.close();
	long A = N;
	long B = N;
	int C = 0;
	String ans = "";
	while(A>=26){
		A /= 26;
		C++;
	}
		for(int i = 0; i < C; i++){
				L[i] = B % 26;
				B /= 26;
		}
			ans+= Alf[(int)B-1];
			for(int j = C-1; j >= 1; j--){
				ans += Alf[(int)L[j]-1];
			}
			ans+= Alf[(int)L[0]];
		System.out.println(ans);
		}
}
0