結果

問題 No.227 簡単ポーカー
ユーザー zmirezzmirez
提出日時 2018-08-25 15:17:47
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 57 ms / 5,000 ms
コード長 801 bytes
コンパイル時間 3,791 ms
コンパイル使用メモリ 103,720 KB
実行使用メモリ 22,840 KB
最終ジャッジ日時 2023-09-08 10:39:45
合計ジャッジ時間 4,678 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,704 KB
testcase_01 AC 57 ms
22,840 KB
testcase_02 AC 56 ms
18,752 KB
testcase_03 AC 57 ms
20,704 KB
testcase_04 AC 55 ms
20,640 KB
testcase_05 AC 56 ms
20,644 KB
testcase_06 AC 55 ms
20,704 KB
testcase_07 AC 55 ms
20,812 KB
testcase_08 AC 55 ms
18,772 KB
testcase_09 AC 55 ms
20,704 KB
testcase_10 AC 56 ms
20,696 KB
testcase_11 AC 55 ms
20,732 KB
testcase_12 AC 56 ms
22,784 KB
testcase_13 AC 55 ms
20,756 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class Program{
    static void Main(string[]args){
        string[]t=Console.ReadLine().Split(' ');
        int[]A=new int[t.Length];
        for(int i=0;i<t.Length;i++){
            A[i]=int.Parse(t[i]);
        }
        int count=0;
        for(int i=0;i<A.Length-1;i++){
            for(int j=i+1;j<A.Length;j++){
                if(A[i]==A[j]){
                    count++;
                }
            }
        }
        if(count==4){
            Console.WriteLine("FULL HOUSE");
        }else if(count==3){
            Console.WriteLine("THREE CARD");
        }else if(count==2){
            Console.WriteLine("TWO PAIR");
        }
        else if(count==1){
            Console.WriteLine("ONE PAIR");
        }else{
            Console.WriteLine("NO HAND");
        }
    }
}
0