結果

問題 No.26 シャッフルゲーム
ユーザー irisAshirisAsh
提出日時 2017-08-11 15:53:10
言語 JavaScript
(node v20.8.0)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 282 bytes
コンパイル時間 210 ms
コンパイル使用メモリ 5,344 KB
実行使用メモリ 44,196 KB
最終ジャッジ日時 2023-08-03 02:14:06
合計ジャッジ時間 1,602 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
42,280 KB
testcase_01 AC 75 ms
42,236 KB
testcase_02 AC 77 ms
42,240 KB
testcase_03 AC 76 ms
42,156 KB
testcase_04 AC 76 ms
44,196 KB
testcase_05 AC 77 ms
42,360 KB
testcase_06 AC 75 ms
42,180 KB
testcase_07 AC 75 ms
42,268 KB
testcase_08 AC 75 ms
42,188 KB
testcase_09 AC 76 ms
42,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

let i = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n').slice(0, -1)
let s = i[0]
for (let x = 2; x < i.length; x++) {
  if (i[x].indexOf(s) > -1) {
    for (let c of i[x].split(' ')) {
      if (c !== s) {
        s = c
        break
      }
    }
  }
}
console.log(s)
0