結果
問題 |
No.481 1から10
|
ユーザー |
|
提出日時 | 2020-09-16 09:40:20 |
言語 | TypeScript (5.7.2) |
結果 |
RE
|
実行時間 | - |
コード長 | 349 bytes |
コンパイル時間 | 7,739 ms |
コンパイル使用メモリ | 228,984 KB |
実行使用メモリ | 40,064 KB |
最終ジャッジ日時 | 2024-12-31 16:19:39 |
合計ジャッジ時間 | 8,930 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 7 RE * 1 |
ソースコード
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'));