結果
問題 | No.327 アルファベット列 |
ユーザー |
![]() |
提出日時 | 2016-05-13 12:23:28 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 61 ms / 2,000 ms |
コード長 | 851 bytes |
コンパイル時間 | 2,449 ms |
コンパイル使用メモリ | 76,216 KB |
実行使用メモリ | 37,036 KB |
最終ジャッジ日時 | 2024-10-06 23:33:38 |
合計ジャッジ時間 | 6,817 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 50 |
ソースコード
/* 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()); ArrayList<Long> pool = new ArrayList<Long>(); while(n>0l){ pool.add(n%26l); n /= 26l; n--; } if(n==0l){ pool.add(0l); } 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))); } } }