結果

問題 No.327 アルファベット列
ユーザー wreulicke
提出日時 2015-12-20 04:50:50
言語 JavaScript
(node v23.5.0)
結果
WA  
実行時間 -
コード長 403 bytes
コンパイル時間 112 ms
コンパイル使用メモリ 5,120 KB
実行使用メモリ 39,552 KB
最終ジャッジ日時 2024-10-12 23:35:56
合計ジャッジ時間 4,830 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

function test(n) {
  var result = []
  var offset = 0
  do {
    result.unshift(String.fromCharCode((n % 26) + 65 + offset))
    n = Math.floor(n / 26)
    offset = -1
  } while (n > 0);
  return (result.join(''))
}
function Main(input) {
  var input = input
    .toString()
    .split('\n')[0];
  var N = parseInt(input)
  console.log(test(N))
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
0