結果

問題 No.227 簡単ポーカー
ユーザー rensyuu88rensyuu88
提出日時 2020-02-02 23:57:05
言語 C
(gcc 12.3.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 562 bytes
コンパイル時間 919 ms
コンパイル使用メモリ 29,524 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 01:35:07
合計ジャッジ時間 1,734 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<stdio.h>

int main() {
	int a[5];
	int kijyun;
	int i, j;
	for (i = 0; i < 5; i++) {
		scanf("%d", &a[i]);
		if (a[i] <= 0 || a[i] >= 14) {
			printf("incorrect input input 1~13");
			scanf("%d", &a[i]);
		}
	}
	for (i = 0; i < 5; i++) {
		for (j = i + 1; j < 5; j++) {
			if (a[i] == a[j]) {
				kijyun++;
			}
		}
	}
	switch (kijyun) {
	case 1:
		printf("ONE PAIR");
		break;
	case 2:
		printf("TWO PAIR");
		break;
	case 3:
		printf("THREE CARD");
		break;
	case 4:
		printf("FULL HOUSE");
		break;
	default:
		printf("NO HAND");
	}

	return 0;
}

0