結果

問題 No.227 簡単ポーカー
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-14 00:42:43
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 793 bytes
コンパイル時間 2,549 ms
コンパイル使用メモリ 71,388 KB
実行使用メモリ 56,428 KB
最終ジャッジ日時 2023-08-17 04:30:57
合計ジャッジ時間 4,477 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,456 KB
testcase_01 AC 121 ms
55,988 KB
testcase_02 AC 122 ms
55,664 KB
testcase_03 AC 123 ms
56,080 KB
testcase_04 AC 120 ms
55,900 KB
testcase_05 AC 120 ms
55,396 KB
testcase_06 AC 120 ms
56,428 KB
testcase_07 AC 123 ms
55,644 KB
testcase_08 AC 122 ms
56,088 KB
testcase_09 AC 121 ms
55,920 KB
testcase_10 AC 124 ms
55,752 KB
testcase_11 AC 134 ms
55,860 KB
testcase_12 AC 124 ms
55,912 KB
testcase_13 AC 124 ms
55,708 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