結果
問題 | No.227 簡単ポーカー |
ユーザー |
![]() |
提出日時 | 2015-09-19 15:56:16 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 135 ms / 5,000 ms |
コード長 | 565 bytes |
コンパイル時間 | 3,406 ms |
コンパイル使用メモリ | 76,500 KB |
実行使用メモリ | 41,416 KB |
最終ジャッジ日時 | 2024-07-19 07:57:31 |
合計ジャッジ時間 | 5,972 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
import java.util.Scanner; public class m { 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 PAIR");} else if(p2==1){System.out.println("ONE PAIR");} else System.out.println("NO HAND"); } }