結果

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

ソースコード

diff #

# No.1249 小学校1年生の夢
# https://yukicoder.me/problems/no/1249
Warning[:experimental] = false

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