結果

問題 No.1249 小学校1年生の夢
ユーザー pink_bangbi
提出日時 2020-10-14 19:39:46
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 276 bytes
コンパイル時間 39 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-07-20 19:16:07
合計ジャッジ時間 4,044 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 13 WA * 17
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def calc(input)
#   input.split(" ").map(&:to_i).then { |a, b, c|
#     a + b == c ? "Correct" : "Incorrect"
#   }
  case input.split(" ").map(&:to_i)
  in [a, b, c] if a + b == c
    "Correct"
  else
    "Incorrect"
  end
end

input = "4 1 5"
# input = gets
puts calc(input)
0