結果

問題 No.327 アルファベット列
ユーザー yun_appyun_app
提出日時 2016-05-13 12:22:08
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 881 bytes
コンパイル時間 2,220 ms
コンパイル使用メモリ 76,516 KB
実行使用メモリ 52,556 KB
最終ジャッジ日時 2024-04-15 15:28:46
合計ジャッジ時間 6,653 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
50,180 KB
testcase_01 AC 56 ms
50,260 KB
testcase_02 WA -
testcase_03 AC 56 ms
50,272 KB
testcase_04 AC 57 ms
50,276 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 55 ms
50,344 KB
testcase_08 AC 59 ms
50,316 KB
testcase_09 AC 57 ms
50,144 KB
testcase_10 WA -
testcase_11 AC 58 ms
50,444 KB
testcase_12 AC 57 ms
50,204 KB
testcase_13 AC 56 ms
50,236 KB
testcase_14 AC 55 ms
50,288 KB
testcase_15 AC 56 ms
50,364 KB
testcase_16 WA -
testcase_17 AC 56 ms
50,268 KB
testcase_18 AC 56 ms
49,936 KB
testcase_19 WA -
testcase_20 AC 56 ms
50,088 KB
testcase_21 AC 56 ms
50,328 KB
testcase_22 AC 58 ms
50,152 KB
testcase_23 AC 55 ms
50,352 KB
testcase_24 AC 56 ms
50,232 KB
testcase_25 WA -
testcase_26 AC 56 ms
50,360 KB
testcase_27 AC 56 ms
50,396 KB
testcase_28 WA -
testcase_29 AC 56 ms
49,848 KB
testcase_30 AC 55 ms
49,908 KB
testcase_31 WA -
testcase_32 AC 55 ms
50,256 KB
testcase_33 AC 56 ms
50,400 KB
testcase_34 AC 55 ms
50,080 KB
testcase_35 AC 58 ms
50,284 KB
testcase_36 AC 57 ms
50,328 KB
testcase_37 AC 57 ms
49,872 KB
testcase_38 WA -
testcase_39 AC 56 ms
50,068 KB
testcase_40 AC 56 ms
50,276 KB
testcase_41 AC 56 ms
50,248 KB
testcase_42 WA -
testcase_43 AC 56 ms
50,472 KB
testcase_44 AC 56 ms
50,156 KB
testcase_45 AC 58 ms
50,376 KB
testcase_46 AC 56 ms
50,268 KB
testcase_47 AC 55 ms
50,088 KB
testcase_48 WA -
testcase_49 AC 57 ms
49,944 KB
testcase_50 AC 57 ms
50,212 KB
testcase_51 WA -
testcase_52 AC 56 ms
50,232 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
    public static void main (String[] args) throws java.lang.Exception
    {
        // your code goes here
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long n = Long.parseLong(br.readLine());
        if(n==0){
            System.out.println("A");
            return;
        }
        ArrayList<Long> pool = new ArrayList<Long>();
        while(n>0l){
            pool.add(n%26l);
            n /= 26l;
            n--;
        }
        Collections.reverse(pool);
        System.out.print((char)('A'+pool.get(0)));
        for(int i=1;i<pool.size();i++){
            System.out.print((char)('A'+pool.get(i)));
        }
        
    }
}
0