結果

問題 No.327 アルファベット列
ユーザー kou6839kou6839
提出日時 2015-12-20 00:22:45
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 657 bytes
コンパイル時間 2,484 ms
コンパイル使用メモリ 79,060 KB
実行使用メモリ 58,672 KB
最終ジャッジ日時 2023-10-17 13:03:45
合計ジャッジ時間 11,638 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 149 ms
55,660 KB
testcase_01 AC 152 ms
58,568 KB
testcase_02 AC 152 ms
58,516 KB
testcase_03 AC 152 ms
58,420 KB
testcase_04 WA -
testcase_05 AC 152 ms
58,420 KB
testcase_06 WA -
testcase_07 AC 162 ms
58,492 KB
testcase_08 AC 152 ms
58,428 KB
testcase_09 AC 152 ms
58,572 KB
testcase_10 AC 153 ms
58,572 KB
testcase_11 AC 164 ms
58,280 KB
testcase_12 AC 141 ms
57,912 KB
testcase_13 AC 152 ms
58,496 KB
testcase_14 AC 161 ms
58,396 KB
testcase_15 AC 138 ms
57,724 KB
testcase_16 AC 150 ms
58,448 KB
testcase_17 AC 160 ms
58,320 KB
testcase_18 AC 152 ms
58,496 KB
testcase_19 AC 154 ms
58,304 KB
testcase_20 AC 149 ms
58,556 KB
testcase_21 AC 151 ms
58,480 KB
testcase_22 AC 161 ms
58,284 KB
testcase_23 AC 150 ms
58,416 KB
testcase_24 AC 151 ms
58,488 KB
testcase_25 AC 162 ms
58,384 KB
testcase_26 AC 151 ms
58,280 KB
testcase_27 AC 160 ms
58,544 KB
testcase_28 AC 150 ms
58,360 KB
testcase_29 AC 138 ms
57,988 KB
testcase_30 WA -
testcase_31 AC 151 ms
58,484 KB
testcase_32 AC 151 ms
58,456 KB
testcase_33 AC 150 ms
58,564 KB
testcase_34 AC 149 ms
58,552 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(26, ind)) ind++;
		ind--;
		String unko="";
		for(int i=ind;i>=1;i--){
			unko+=(char)((int)'A'+(int)(n/Math.pow(26, i))-1);
			n%=Math.pow(26, i);
		}
		System.out.println(unko+ans);
	} 
}
0