結果

問題 No.327 アルファベット列
ユーザー wreulicke
提出日時 2015-12-20 05:52:27
言語 JavaScript
(node v23.5.0)
結果
WA  
実行時間 -
コード長 401 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 6,696 KB
実行使用メモリ 41,448 KB
最終ジャッジ日時 2024-10-12 23:36:40
合計ジャッジ時間 4,633 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

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