結果

問題 No.227 簡単ポーカー
ユーザー kohaku_kohaku
提出日時 2016-11-14 00:42:43
言語 Java
(openjdk 23)
結果
AC  
実行時間 131 ms / 5,000 ms
コード長 793 bytes
コンパイル時間 1,822 ms
コンパイル使用メモリ 75,044 KB
実行使用メモリ 54,384 KB
最終ジャッジ日時 2024-11-25 22:08:12
合計ジャッジ時間 4,252 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

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