結果

問題 No.24 数当てゲーム
ユーザー cmycmy
提出日時 2022-07-06 20:04:51
言語 Bash
(Bash 5.1.16)
結果
WA  
実行時間 -
コード長 239 bytes
コンパイル時間 74 ms
コンパイル使用メモリ 5,296 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-08-24 19:17:12
合計ジャッジ時間 1,075 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

read n
a=$(seq 9)
for i in $(seq $n); do
  read s
  v=$(echo ${s:0:7} | tr ' ' \\n | sort -n)
  if [[ ${s:8} = "YES" ]]; then
    a=$(comm -12 <(echo "$a") <(echo "$v"))
  else
    a=$(comm -23 <(echo "$a") <(echo "$v"))
  fi
done
echo $a
0