結果

問題 No.227 簡単ポーカー
ユーザー Ruizi_LuigiRuizi_Luigi
提出日時 2015-08-04 14:01:44
言語 PHP
(8.3.4)
結果
AC  
実行時間 18 ms / 5,000 ms
コード長 514 bytes
コンパイル時間 1,179 ms
コンパイル使用メモリ 18,668 KB
実行使用メモリ 18,944 KB
最終ジャッジ日時 2023-09-25 01:03:13
合計ジャッジ時間 2,261 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
18,672 KB
testcase_01 AC 18 ms
18,824 KB
testcase_02 AC 16 ms
18,944 KB
testcase_03 AC 15 ms
18,816 KB
testcase_04 AC 16 ms
18,904 KB
testcase_05 AC 15 ms
18,888 KB
testcase_06 AC 15 ms
18,900 KB
testcase_07 AC 15 ms
18,776 KB
testcase_08 AC 16 ms
18,924 KB
testcase_09 AC 16 ms
18,672 KB
testcase_10 AC 16 ms
18,840 KB
testcase_11 AC 16 ms
18,652 KB
testcase_12 AC 16 ms
18,820 KB
testcase_13 AC 15 ms
18,784 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$a_list = explode(' ', trim(fgets(STDIN)));

$result = array_count_values(array_count_values($a_list));
if ((array_key_exists(2, $result) && $result[2] == 1) && (array_key_exists(3, $result) && $result[3] == 1)) {
  echo "FULL HOUSE";
} else if (array_key_exists(2, $result) && $result[2] == 2) {
  echo "TWO PAIR";
} else if (array_key_exists(3, $result) && $result[3] == 1) {
  echo "THREE CARD";
} else if (array_key_exists(2, $result) && $result[2] == 1) {
  echo "ONE PAIR";
} else {
  echo "NO HAND";
}
0