結果

問題 No.227 簡単ポーカー
ユーザー 3qvwn3qvwn
提出日時 2019-07-08 00:50:57
言語 Elixir
(1.16.2)
結果
RE  
実行時間 -
コード長 422 bytes
コンパイル時間 1,212 ms
コンパイル使用メモリ 54,892 KB
実行使用メモリ 52,400 KB
最終ジャッジ日時 2023-08-29 23:42:47
合計ジャッジ時間 12,206 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 625 ms
49,268 KB
testcase_02 AC 625 ms
49,276 KB
testcase_03 AC 626 ms
50,008 KB
testcase_04 AC 635 ms
49,168 KB
testcase_05 AC 631 ms
49,344 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
権限があれば一括ダウンロードができます

ソースコード

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([1,1,1,1,1]), do: "NO HAND"
end
0