結果

問題 No.547 未知の言語
ユーザー dy
提出日時 2018-01-19 10:42:19
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 618 bytes
コンパイル時間 130 ms
コンパイル使用メモリ 6,688 KB
実行使用メモリ 39,296 KB
最終ジャッジ日時 2024-10-13 00:34:48
合計ジャッジ時間 3,238 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

const main = (input) => {
  const input_lines = input.split("\n");
  const second_line_words = input_lines[1].split(" ");
  const third_line_words = input_lines[2].split(" ");

  let answer_words = [];
  let answer_number = 0;

  for (const i in second_line_words) {
    if (second_line_words[i] != third_line_words[i]) {
      answer_words = [second_line_words[i], third_line_words[i]];
      answer_number = parseInt(i) + 1;
      break;
    }
  }

  console.log(answer_number);
  for (const answer_word of answer_words) {
    console.log(answer_word);
  }
};

main(require("fs").readFileSync("/dev/stdin", "utf8"));
0