結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 628 ms
50,312 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 633 ms
49,752 KB
testcase_06 AC 628 ms
49,308 KB
testcase_07 WA -
testcase_08 AC 629 ms
49,760 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) |> Enum.sort |> 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