結果

問題 No.227 簡単ポーカー
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-14 00:42:43
言語 Java21
(openjdk 21)
結果
AC  
実行時間 116 ms / 5,000 ms
コード長 793 bytes
コンパイル時間 2,157 ms
コンパイル使用メモリ 74,004 KB
実行使用メモリ 41,584 KB
最終ジャッジ日時 2024-05-04 11:32:02
合計ジャッジ時間 3,843 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
41,304 KB
testcase_01 AC 112 ms
41,444 KB
testcase_02 AC 110 ms
41,460 KB
testcase_03 AC 111 ms
41,424 KB
testcase_04 AC 107 ms
40,208 KB
testcase_05 AC 95 ms
41,516 KB
testcase_06 AC 111 ms
41,188 KB
testcase_07 AC 105 ms
41,452 KB
testcase_08 AC 116 ms
41,584 KB
testcase_09 AC 101 ms
41,580 KB
testcase_10 AC 109 ms
41,272 KB
testcase_11 AC 109 ms
41,300 KB
testcase_12 AC 101 ms
41,252 KB
testcase_13 AC 114 ms
41,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int [] A = new int [5];
        for(int i=0; i<5; i++){
            A[i] = sc.nextInt();
        }
        int count=0;
        for(int i=0; i<5; i++){
            for(int j=0; j<5; j++){
                if(A[i]==A[j]){
                    count++;
                }
            }
        }
        if(count==13){
            System.out.println("FULL HOUSE");
        }else if(count==11){
            System.out.println("THREE CARD");
        }else if(count==9){
            System.out.println("TWO PAIR");
        }else if(count==7){
            System.out.println("ONE PAIR");
        }else{
            System.out.println("NO HAND");
        }
    }
}
0