結果

問題 No.327 アルファベット列
ユーザー kou6839kou6839
提出日時 2015-12-20 00:49:15
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 670 bytes
コンパイル時間 2,541 ms
コンパイル使用メモリ 79,080 KB
実行使用メモリ 58,568 KB
最終ジャッジ日時 2023-10-17 13:08:02
合計ジャッジ時間 12,733 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 164 ms
58,412 KB
testcase_01 AC 161 ms
58,368 KB
testcase_02 WA -
testcase_03 AC 159 ms
58,256 KB
testcase_04 AC 158 ms
58,356 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 159 ms
58,344 KB
testcase_08 AC 160 ms
58,288 KB
testcase_09 AC 159 ms
58,488 KB
testcase_10 WA -
testcase_11 AC 162 ms
58,260 KB
testcase_12 AC 162 ms
58,260 KB
testcase_13 AC 162 ms
58,420 KB
testcase_14 AC 164 ms
58,496 KB
testcase_15 AC 168 ms
58,248 KB
testcase_16 AC 166 ms
58,272 KB
testcase_17 AC 162 ms
58,476 KB
testcase_18 AC 161 ms
58,448 KB
testcase_19 WA -
testcase_20 AC 161 ms
58,320 KB
testcase_21 AC 160 ms
58,368 KB
testcase_22 AC 162 ms
58,280 KB
testcase_23 AC 154 ms
57,804 KB
testcase_24 AC 163 ms
58,476 KB
testcase_25 WA -
testcase_26 AC 158 ms
58,472 KB
testcase_27 AC 157 ms
58,440 KB
testcase_28 WA -
testcase_29 AC 160 ms
58,232 KB
testcase_30 AC 166 ms
58,376 KB
testcase_31 WA -
testcase_32 AC 166 ms
58,408 KB
testcase_33 AC 159 ms
58,344 KB
testcase_34 AC 159 ms
58,484 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 WA -
testcase_52 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.net.NetworkInterface;
import java.util.*;

public class Main {
	static long gcd(long a,long b){
		return b == 0 ? a : gcd(b, a%b);
	}
	static long lcm(long a, long b){
		return a*b/gcd(a, b);
	}
	static int[] dx = {1,0,-1,0};
	static int[] dy = {0,1,0,-1};
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		String ans = "";
		ans+=(char)((int)'A'+n%26);
		int ind = 1;
		while(n>=Math.pow(27, ind)) ind++;
		ind--;
		String unko="";
		for(int i=ind;i>=1;i--){
			unko+=(char)((int)'A'+(int)(n/Math.pow(26, i))+(ind==1?-1:-1));
			n%=Math.pow(26, i);
		}
		System.out.println(unko+ans);
	} 
}
0