結果

問題 No.1362 [Zelkova 8th Tune] Black Sheep
ユーザー jp_stejp_ste
提出日時 2021-02-01 04:38:47
言語 TypeScript
(5.4.3)
結果
AC  
実行時間 95 ms / 1,000 ms
コード長 400 bytes
コンパイル時間 8,194 ms
コンパイル使用メモリ 253,492 KB
実行使用メモリ 46,908 KB
最終ジャッジ日時 2023-09-12 10:06:57
合計ジャッジ時間 13,870 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
42,260 KB
testcase_01 AC 74 ms
42,384 KB
testcase_02 AC 74 ms
42,228 KB
testcase_03 AC 74 ms
42,224 KB
testcase_04 AC 73 ms
42,340 KB
testcase_05 AC 73 ms
42,408 KB
testcase_06 AC 75 ms
42,252 KB
testcase_07 AC 74 ms
42,268 KB
testcase_08 AC 75 ms
42,424 KB
testcase_09 AC 75 ms
42,500 KB
testcase_10 AC 76 ms
42,216 KB
testcase_11 AC 75 ms
42,384 KB
testcase_12 AC 76 ms
42,388 KB
testcase_13 AC 86 ms
46,432 KB
testcase_14 AC 82 ms
46,464 KB
testcase_15 AC 81 ms
45,852 KB
testcase_16 AC 77 ms
42,780 KB
testcase_17 AC 92 ms
46,908 KB
testcase_18 AC 86 ms
46,316 KB
testcase_19 AC 93 ms
46,676 KB
testcase_20 AC 90 ms
46,292 KB
testcase_21 AC 85 ms
46,284 KB
testcase_22 AC 79 ms
43,096 KB
testcase_23 AC 84 ms
46,608 KB
testcase_24 AC 95 ms
46,532 KB
testcase_25 AC 89 ms
46,544 KB
testcase_26 AC 90 ms
46,684 KB
testcase_27 AC 82 ms
46,532 KB
testcase_28 AC 84 ms
46,560 KB
testcase_29 AC 91 ms
46,708 KB
testcase_30 AC 89 ms
46,656 KB
testcase_31 AC 93 ms
46,832 KB
testcase_32 AC 90 ms
46,716 KB
testcase_33 AC 93 ms
46,716 KB
testcase_34 AC 76 ms
43,052 KB
testcase_35 AC 76 ms
42,364 KB
testcase_36 AC 73 ms
42,264 KB
testcase_37 AC 74 ms
42,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

function main(s) {
  if(s[0] !== s[1]) {
    if(s[0] === s[2]) {
      console.log(2 + " " + s[1]);
    } else if(s[1] === s[2]) {
      console.log(1 + " " + s[0]);
    }
  } else {
    for(let i=2; i<s.length; i++) {
      if(s[0] !== s[i]) {
        console.log((i+1) + " " + s[i]);
        break;
      }
    }
  }
}

main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n")[0]);
0