結果

問題 No.227 簡単ポーカー
ユーザー 37zigen37zigen
提出日時 2016-03-22 12:56:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 153 ms / 5,000 ms
コード長 621 bytes
コンパイル時間 2,530 ms
コンパイル使用メモリ 74,664 KB
実行使用メモリ 58,240 KB
最終ジャッジ日時 2024-04-08 21:50:54
合計ジャッジ時間 5,490 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 146 ms
57,812 KB
testcase_01 AC 148 ms
57,832 KB
testcase_02 AC 148 ms
57,840 KB
testcase_03 AC 152 ms
57,812 KB
testcase_04 AC 146 ms
58,240 KB
testcase_05 AC 153 ms
57,936 KB
testcase_06 AC 146 ms
57,912 KB
testcase_07 AC 145 ms
57,860 KB
testcase_08 AC 145 ms
58,216 KB
testcase_09 AC 147 ms
58,204 KB
testcase_10 AC 151 ms
57,852 KB
testcase_11 AC 143 ms
57,832 KB
testcase_12 AC 147 ms
58,092 KB
testcase_13 AC 148 ms
57,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int[] f=new int[14];
		for(int i=0;i<5;i++){
			int a=sc.nextInt();
			f[a]++;
		}
		Arrays.sort(f);
//		for(int i=0;i<14;i++){
//			System.out.println(f[i]);
//		}
		if(f[13]==3&&f[12]==2){
			System.out.println("FULL HOUSE");
		}else if(f[13]==3){
			System.out.println("THREE CARD");
		}else if(f[13]==2&&f[12]==2){
			System.out.println("TWO PAIR");
		}else if(f[13]==2){
			System.out.println("ONE PAIR");
		}else{
			System.out.println("NO HAND");
		}
		
		
	}
}
0