結果

問題 No.227 簡単ポーカー
ユーザー konken0324konken0324
提出日時 2015-09-19 15:55:07
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 566 bytes
コンパイル時間 2,317 ms
コンパイル使用メモリ 71,676 KB
実行使用メモリ 57,692 KB
最終ジャッジ日時 2023-09-26 13:38:20
合計ジャッジ時間 4,649 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
53,448 KB
testcase_01 AC 123 ms
55,868 KB
testcase_02 AC 128 ms
55,932 KB
testcase_03 WA -
testcase_04 AC 128 ms
55,676 KB
testcase_05 AC 126 ms
55,760 KB
testcase_06 AC 127 ms
55,352 KB
testcase_07 AC 127 ms
55,788 KB
testcase_08 AC 128 ms
55,804 KB
testcase_09 AC 126 ms
56,052 KB
testcase_10 AC 124 ms
55,732 KB
testcase_11 AC 123 ms
55,908 KB
testcase_12 WA -
testcase_13 AC 126 ms
55,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int cou[]=new int [13];
		for(int i=0;i<5;i++){
			cou[stdIn.nextInt()-1]++;
		}
		int p2=0;
		int p3=0;
		for(int i=0;i<13;i++){
			if(cou[i]==2)p2++;
			else if(cou[i]==3)p3++;
		}
		if(p3==1&&p2==1){System.out.println("FULL HOUSE");}
		else if(p3==1){System.out.println("THREE CARD");}
		else if(p2==2){System.out.println("TWO CARD");}
		else if(p2==1){System.out.println("ONE PAIR");}
		else System.out.println("NO HAND");
	}
}
0