結果
問題 |
No.227 簡単ポーカー
|
ユーザー |
|
提出日時 | 2019-02-14 08:52:51 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 616 bytes |
コンパイル時間 | 2,360 ms |
コンパイル使用メモリ | 74,952 KB |
実行使用メモリ | 56,160 KB |
最終ジャッジ日時 | 2024-09-13 11:17:30 |
合計ジャッジ時間 | 4,823 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 WA * 4 |
ソースコード
import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int[] ar = new int[13]; for (int i=0; i<5; i++) ar[sc.nextInt()-1]++; int threeNum = 0; int twoNum = 0; for (int i=0; i<13; i++) { if (ar[i] == 3) threeNum++; else if (ar[i] == 2) twoNum++; } if (threeNum==1 && twoNum==1) System.out.println("FULL HOUSE"); else if (threeNum==1 && twoNum==0) System.out.println("THREE CARD"); else if (threeNum==0 && twoNum==2) System.out.println("TWO PAIR"); else if (threeNum==0 && twoNum==1) System.out.println("ONE PAIR"); } }