結果

問題 No.227 簡単ポーカー
ユーザー nCk_cvnCk_cv
提出日時 2015-09-19 16:13:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 459 bytes
コンパイル時間 2,209 ms
コンパイル使用メモリ 71,636 KB
実行使用メモリ 56,492 KB
最終ジャッジ日時 2023-09-26 13:38:51
合計ジャッジ時間 4,553 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,712 KB
testcase_01 AC 116 ms
55,944 KB
testcase_02 AC 117 ms
55,404 KB
testcase_03 AC 115 ms
54,180 KB
testcase_04 AC 120 ms
55,872 KB
testcase_05 AC 118 ms
55,568 KB
testcase_06 AC 119 ms
55,672 KB
testcase_07 AC 119 ms
55,516 KB
testcase_08 AC 119 ms
56,224 KB
testcase_09 AC 122 ms
56,020 KB
testcase_10 AC 120 ms
55,668 KB
testcase_11 AC 120 ms
56,492 KB
testcase_12 AC 120 ms
56,052 KB
testcase_13 AC 122 ms
56,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;
import java.io.*;
public class Main {

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

}
0