結果

問題 No.1249 小学校1年生の夢
ユーザー penqen
提出日時 2020-12-14 17:03:39
言語 Elixir
(1.18.1)
結果
AC  
実行時間 588 ms / 2,000 ms
コード長 413 bytes
コンパイル時間 1,305 ms
コンパイル使用メモリ 62,632 KB
実行使用メモリ 55,368 KB
最終ジャッジ日時 2024-12-31 05:12:59
合計ジャッジ時間 21,647 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do
    def main do
        [a, b, c] = IO.read(:line) |> String.trim() |> String.split(" ") |> Enum.map(&String.to_integer/1)
        solve(a, b, c) |> IO.puts()
    end
    
     def solve(a, b, c) when 0 <= a and b <= 100 and 0 <= c and c <= 200 do
        if a + b == c do
          "Correct"
        else
          "Incorrect"
        end
    end

    def solve(_a, _b, _c), do: "Incorrect"
end
0