結果

問題 No.227 簡単ポーカー
ユーザー keymoonkeymoon
提出日時 2019-02-23 13:02:06
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 5,000 ms
コード長 857 bytes
コンパイル時間 2,960 ms
コンパイル使用メモリ 103,920 KB
実行使用メモリ 23,976 KB
最終ジャッジ日時 2023-08-19 20:03:00
合計ジャッジ時間 3,451 ms
ジャッジサーバーID
(参考情報)
judge10 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
21,940 KB
testcase_01 AC 58 ms
21,916 KB
testcase_02 AC 59 ms
23,960 KB
testcase_03 AC 59 ms
23,928 KB
testcase_04 AC 59 ms
21,968 KB
testcase_05 AC 58 ms
21,876 KB
testcase_06 AC 56 ms
21,912 KB
testcase_07 AC 58 ms
21,876 KB
testcase_08 AC 56 ms
21,936 KB
testcase_09 AC 57 ms
21,924 KB
testcase_10 AC 56 ms
23,904 KB
testcase_11 AC 57 ms
21,876 KB
testcase_12 AC 58 ms
23,976 KB
testcase_13 AC 61 ms
21,916 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.IO;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Numerics;
using System.Diagnostics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;

class P
{
    static void Main()
    {
        var pair = Console.ReadLine().Split().Select(int.Parse).GroupBy(x => x).OrderByDescending(x => x.Count()).ToArray();
        string hand = "NO HAND";
        if (pair.Count() != 1)
        {
            if (pair[0].Count() == 3 && pair[1].Count() == 2) hand = "FULL HOUSE";
            else if (pair[0].Count() == 3) hand = "THREE CARD";
            else if (pair[0].Count() == 2 && pair[1].Count() == 2) hand = "TWO PAIR";
            else if (pair[0].Count() == 2) hand = "ONE PAIR";
        }
        Console.WriteLine(hand);
    }
}
0