結果

問題 No.964 2020
ユーザー j0tdj0td
提出日時 2020-03-02 00:10:45
言語 JavaScript
(node v20.8.0)
結果
AC  
実行時間 89 ms / 2,020 ms
コード長 383 bytes
コンパイル時間 56 ms
コンパイル使用メモリ 5,348 KB
実行使用メモリ 42,732 KB
最終ジャッジ日時 2023-08-03 03:38:20
合計ジャッジ時間 1,795 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
42,596 KB
testcase_01 AC 89 ms
42,692 KB
testcase_02 AC 83 ms
42,732 KB
testcase_03 AC 84 ms
42,624 KB
testcase_04 AC 84 ms
42,544 KB
testcase_05 AC 88 ms
42,624 KB
testcase_06 AC 83 ms
42,600 KB
testcase_07 AC 83 ms
42,612 KB
testcase_08 AC 84 ms
42,644 KB
testcase_09 AC 83 ms
42,500 KB
権限があれば一括ダウンロードができます

ソースコード

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