結果

問題 No.227 簡単ポーカー
ユーザー 3qvwn3qvwn
提出日時 2019-07-08 00:52:40
言語 Elixir
(1.16.2)
結果
WA  
実行時間 -
コード長 412 bytes
コンパイル時間 1,126 ms
コンパイル使用メモリ 54,584 KB
実行使用メモリ 50,352 KB
最終ジャッジ日時 2023-08-29 23:43:19
合計ジャッジ時間 11,268 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 611 ms
49,260 KB
testcase_01 AC 610 ms
49,704 KB
testcase_02 AC 613 ms
49,360 KB
testcase_03 AC 611 ms
49,856 KB
testcase_04 AC 616 ms
49,280 KB
testcase_05 AC 610 ms
49,256 KB
testcase_06 AC 611 ms
49,352 KB
testcase_07 WA -
testcase_08 AC 615 ms
49,372 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do 
  def main do
    IO.gets("") |> String.trim |> String.split |> Enum.map(&String.to_integer/1) |> Enum.group_by(fn x -> x end) |> Enum.map(fn {_, value} -> Enum.count(value) end) |> judge |> IO.puts
  end
  
  def judge([3,2]), do: "FULL HOUSE"
  def judge([3,1,1]), do: "THREE CARD"
  def judge([2,2,1]), do: "TWO PAIR"
  def judge([2,1,1,1]), do: "ONE PAIR"
  def judge(_), do: "NO HAND"
end
0