結果

問題 No.227 簡単ポーカー
ユーザー TLwiegehttTLwiegehtt
提出日時 2015-07-08 03:36:41
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 491 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 23,368 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-22 09:30:40
合計ジャッジ時間 1,009 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 WA -
testcase_08 AC 1 ms
4,376 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main(void){
	int i, card[15];
	int pairNum[5];
	for(i=0;i<15;i++){card[i] = 0;}
	for(i=0;i<5;i++){pairNum[i] = 0;}
	
	for(i=0;i<5;i++){
		int tmp;
		scanf("%d", &tmp);
		card[tmp]++;
	}
	
	if( pairNum[3] == 1 && pairNum[2] == 1 ){
		printf("FULL HOUSE\n");
	}else if( pairNum[3] == 1 ){
		printf("THREE CARD\n");
	}else if( pairNum[2] == 2 ){
		printf("TWO PAIR\n");
	}else if( pairNum[2] == 1 ){
		printf("ONE PAIR\n");
	}else{
		printf("NO HAND\n");
	}
	return 0;
}
0