結果

問題 No.481 1から10
ユーザー intercept6intercept6
提出日時 2020-09-10 15:58:38
言語 TypeScript
(5.4.3)
結果
RE  
実行時間 -
コード長 349 bytes
コンパイル時間 9,834 ms
コンパイル使用メモリ 250,832 KB
実行使用メモリ 42,304 KB
最終ジャッジ日時 2023-08-24 23:44:25
合計ジャッジ時間 11,350 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
41,936 KB
testcase_01 AC 77 ms
41,760 KB
testcase_02 AC 77 ms
41,928 KB
testcase_03 AC 78 ms
41,868 KB
testcase_04 AC 77 ms
41,940 KB
testcase_05 AC 78 ms
41,984 KB
testcase_06 AC 77 ms
41,976 KB
testcase_07 AC 77 ms
41,800 KB
testcase_08 AC 76 ms
41,960 KB
testcase_09 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import { readFileSync } from 'fs';

function Main(input: string) {
  const data = input.split('\n');

  const numbers = data[0].split(' ').map(Number);

  const res = numbers.find((value, index) => value !== index + 1);
  if (res == null) {
    throw new Error('Not Found');
  }

  console.log(res - 1);
}

Main(readFileSync('/dev/stdin', 'utf8'));
0