結果

問題 No.1934 Four Fruits
ユーザー simansiman
提出日時 2022-06-05 20:32:03
言語 Ruby
(3.3.0)
結果
AC  
実行時間 88 ms / 2,000 ms
コード長 203 bytes
コンパイル時間 711 ms
コンパイル使用メモリ 11,900 KB
実行使用メモリ 16,096 KB
最終ジャッジ日時 2023-10-21 03:17:22
合計ジャッジ時間 2,962 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
16,096 KB
testcase_01 AC 86 ms
16,096 KB
testcase_02 AC 87 ms
16,096 KB
testcase_03 AC 88 ms
16,096 KB
testcase_04 AC 87 ms
16,096 KB
testcase_05 AC 88 ms
16,096 KB
testcase_06 AC 88 ms
16,096 KB
testcase_07 AC 88 ms
16,096 KB
testcase_08 AC 87 ms
16,096 KB
testcase_09 AC 88 ms
16,096 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a, b, c = gets.split.map(&:to_i)

case [a, b, c].uniq.size
when 1
  puts a
when 2
  if a == b
    puts c
  elsif a == c
    puts b
  else
    puts a
  end
when 3
  puts ([0, 1, 2, 3] - [a, b, c])[0]
end
0