結果
問題 |
No.1129 Rating じゃんけん
|
ユーザー |
|
提出日時 | 2020-12-16 12:15:20 |
言語 | Elixir (1.18.1) |
結果 |
AC
|
実行時間 | 537 ms / 2,000 ms |
コード長 | 560 bytes |
コンパイル時間 | 1,062 ms |
コンパイル使用メモリ | 63,468 KB |
実行使用メモリ | 55,448 KB |
最終ジャッジ日時 | 2024-12-31 05:22:01 |
合計ジャッジ時間 | 12,055 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 16 |
ソースコード
defmodule Main do def main do [a, b, c, d] = IO.read(:line) |> String.trim() |> String.split(" ") |> Enum.map(&String.to_integer/1) solve(a, b, c, d) |> IO.puts() end def solve(a, _b, c, _d) when a < c, do: "tRue" def solve(a, _b, c, _d) when c < a, do: "null" def solve(_a, b, _c, d) when b == d, do: "Draw" def solve(_a, b, _c, d), do: fight(b, d) def fight(0, 1), do: "null" def fight(0, 2), do: "tRue" def fight(1, 0), do: "tRue" def fight(1, 2), do: "null" def fight(2, 0), do: "null" def fight(2, 1), do: "tRue" end