630 - I2P2014_Yang_Lab_5 Scoreboard

Time

2014/10/23 13:40:00 2014/10/23 14:40:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
10174 Lab_5

10174 - Lab_5   

Description

Suppose that we have a deck of 52 cards (poker), the number is mapping A to 1, J to 11, Q to 12, and K to 13. Suppose that you are given 5 cards from the deck, and you should print the corresponding category to these five cards.

Note that you do not consider the colors.

Category:

1. Four of a kind (ex: 10 10 10 10 3)

2. Full house (ex: 9 9 9 2 2)

3. Two pair (ex: 5 5 6 6 8)

4. Nothing (ex: 8 7 1 9 54 1 8 8 82 3 4 5 67 7 2 8 6)

 

For example, you are giving the five cards are 8 3 8 3 8. Corresponding to the category is Full house, and you should print Full house as your output.

 

   #include

   int main(void){

                       int card[5];                  //the cards’ numbers of input
        int count[14] = {0};       //the amount of each number of the cards
        int twocount=0;             //the count of pair
        int threecount=0;          //the count of triple
        int fourcount=0;            //the count of quadruple
    
/*  get the input and count the amount of each number of the input  */
   
/*  consider the case and print the output  */

   }
 

 

 

Input

You are given the five cards and the number of the cards is from 1 to 13, which are separated by blanks.

Output

The corresponding category to these five cards.

Remember to print a '\n' at the end of the answer.

Sample Input  Download

Sample Output  Download

Tags




Discuss