結果

問題 No.327 アルファベット列
ユーザー AoiroFukurouAoiroFukurou
提出日時 2015-12-25 21:31:29
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 709 bytes
コンパイル時間 4,065 ms
コンパイル使用メモリ 85,040 KB
実行使用メモリ 57,748 KB
最終ジャッジ日時 2023-10-19 03:50:16
合計ジャッジ時間 13,466 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
57,432 KB
testcase_01 AC 138 ms
57,140 KB
testcase_02 AC 139 ms
57,508 KB
testcase_03 AC 140 ms
57,684 KB
testcase_04 RE -
testcase_05 AC 144 ms
57,476 KB
testcase_06 RE -
testcase_07 AC 140 ms
57,352 KB
testcase_08 AC 140 ms
57,184 KB
testcase_09 AC 140 ms
57,188 KB
testcase_10 AC 143 ms
55,696 KB
testcase_11 AC 144 ms
57,612 KB
testcase_12 AC 143 ms
57,228 KB
testcase_13 AC 146 ms
57,160 KB
testcase_14 AC 144 ms
57,704 KB
testcase_15 AC 146 ms
57,140 KB
testcase_16 AC 140 ms
57,356 KB
testcase_17 AC 140 ms
57,672 KB
testcase_18 AC 143 ms
57,184 KB
testcase_19 AC 142 ms
57,384 KB
testcase_20 AC 144 ms
57,208 KB
testcase_21 AC 144 ms
57,136 KB
testcase_22 AC 142 ms
55,596 KB
testcase_23 AC 142 ms
57,196 KB
testcase_24 AC 142 ms
57,376 KB
testcase_25 AC 140 ms
55,484 KB
testcase_26 AC 142 ms
57,460 KB
testcase_27 AC 139 ms
57,440 KB
testcase_28 AC 142 ms
57,376 KB
testcase_29 AC 145 ms
57,484 KB
testcase_30 RE -
testcase_31 AC 143 ms
57,112 KB
testcase_32 AC 146 ms
55,380 KB
testcase_33 AC 145 ms
57,720 KB
testcase_34 AC 146 ms
57,156 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 = "";
	if(N>=26){
	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]];
	}else{
		ans = Alf[(int)N];
	}
		System.out.println(ans);
		}
}
0