結果

問題 No.227 簡単ポーカー
ユーザー TLwiegehttTLwiegehtt
提出日時 2015-07-08 03:37:32
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 538 bytes
コンパイル時間 120 ms
コンパイル使用メモリ 23,940 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-22 09:30:41
合計ジャッジ時間 877 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

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

ソースコード

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]++;
	}
	for(i=0;i<15;i++){
		pairNum[ card[i] ]++;
	}
	
	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