結果

問題 No.547 未知の言語
コンテスト
ユーザー megane_anko
提出日時 2021-03-10 00:57:22
言語 TypeScript
(6.0.2)
コンパイル:
tsc.sh -p tsconfig.json
実行:
node main.js ONLINE_JUDGE
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 402 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,746 ms
コンパイル使用メモリ 348,692 KB
実行使用メモリ 53,108 KB
最終ジャッジ日時 2026-06-05 05:29:23
合計ジャッジ時間 9,635 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import * as fs from 'fs';
const input = fs.readFileSync('/dev/stdin', 'utf8');

const nlarray = input.split('\n');
const N = parseInt(nlarray[0]);
const Sarray = nlarray[1].split(' ');
const Tarray = nlarray[2].split(' ');

for (let i = 0;i < N; i++) {
    if (Sarray[i] !== Tarray[i]) {
        console.log(i + 1);
        console.log(Sarray[i]);
        console.log(Tarray[i]);
        break;
    }
}
0