結果

問題 No.227 簡単ポーカー
ユーザー 8130Tsk
提出日時 2015-08-08 01:31:39
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 709 bytes
コンパイル時間 4,771 ms
コンパイル使用メモリ 74,620 KB
実行使用メモリ 56,280 KB
最終ジャッジ日時 2024-07-18 05:33:20
合計ジャッジ時間 5,737 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7 WA * 3 RE * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No227 {

	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[] cards = new int[13];
		
		for(int i : a ){
			cards[i]++;
		}
		
		int three = 0;
		int two = 0;
		
		for(int i : cards ){
			if(i==3){
				three++;
			}else if(i==2){
				two++;
			}
			
		}
		
		if(three==1 && two==1 ){
			System.out.println("FULL HOUSE");
		}else if(three==1){
			System.out.println("THREE CARD");
		}else if(two==2){
			System.out.println("TWO PAIR");
		}else if(two==1){
			System.out.println("ONE PAIR");			
		}else{
			System.out.println("NO HANDR");				
		}

	}

}
0