結果

問題 No.964 2020
ユーザー j0td
提出日時 2020-03-02 00:10:45
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 74 ms / 2,020 ms
コード長 383 bytes
コンパイル時間 31 ms
コンパイル使用メモリ 6,692 KB
実行使用メモリ 42,428 KB
最終ジャッジ日時 2024-10-13 01:31:34
合計ジャッジ時間 1,299 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

const reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});

let lines = [];

reader.on('line', line => {
  lines.push(line);
});

reader.on('close', () => {
  let n = parseInt(lines[0]);

  const ans = Array.from(Array(n))
    .map((_, i) => (n - 1) - i)
    .join('')
    .repeat(n);

  console.log(parseInt(ans) === 0 ? 1 : ans);
});
0