結果
| 問題 |
No.227 簡単ポーカー
|
| コンテスト | |
| ユーザー |
8130Tsk
|
| 提出日時 | 2015-08-08 01:35:35 |
| 言語 | Java (openjdk 23) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 709 bytes |
| コンパイル時間 | 4,116 ms |
| コンパイル使用メモリ | 74,884 KB |
| 実行使用メモリ | 56,052 KB |
| 最終ジャッジ日時 | 2024-07-18 05:33:47 |
| 合計ジャッジ時間 | 6,025 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 RE * 4 |
ソースコード
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 HAND");
}
}
}
8130Tsk