結果

問題 No.227 簡単ポーカー
ユーザー kurenai3110
提出日時 2016-10-31 14:36:15
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 393 bytes
コンパイル時間 649 ms
コンパイル使用メモリ 56,708 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-25 00:03:38
合計ジャッジ時間 1,377 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int A[14];

int main() {
	for(int i=0;i<5;i++){
		int a;cin>>a;
		A[a]++;
	}
	int cnt=0;
	for(int i=1;i<14;i++){
		if(A[i]>1 && A[i]<4)cnt+=A[i];
	}
	if(cnt==2)cout<<"ONE PAIR"<<endl;
	else if(cnt==3)cout<<"THREE CARD"<<endl;
	else if(cnt==4)cout<<"TWO PAIR"<<endl;
	else if(cnt==5)cout<<"FULL HOUSE"<<endl;
	else cout<<"NO HAND"<<endl;
	
	return 0;
}
0