2015 Blue Bridge Cup: 7. Number of card types

Source: Internet
Author: User

<title>2015 Blue Bridge Cup: 7. Number of card types</title> 2015 Blue Bridge Cup: 7. Number of card types
21 points 3598180 small white or violence, this is after the test after the classmate told me ....  21 minutes, that's it.

Xiao Ming was hijacked to X Vegas and was forced to play cards with 3 other people.
A deck of poker (minus the size of ace, a total of 52), evenly distributed to 4 people, each 13 Zhang.
At this time, Xiao Ming's brain suddenly emerged a problem:
If you do not consider the suit, only consider the points, also do not consider the order of the cards you get, you can get the initial combination of the total number of types?

int Main(void) {int ans= 0; for(int A0= 0; A0 <= 4; a0++) { for(int A1= 0; A1 <= 4; a1++) { for(int A2= 0; A2 <= 4; a2++) { for(int A3= 0; A3 <= 4; a3++) { for(int A4= 0; A4 <= 4; a4++) { for(int A5= 0; A5 <= 4; a5++) { for(int A6= 0; A6 <= 4; a6++) { for(int A7= 0; A7 <= 4; a7++) { for(int A8= 0; A8 <= 4; a8++) { for(int A9= 0; A9 <= 4; a9++) { for(int A10= 0; A10 <= 4; a10++) { for(int A11= 0; A11 <= 4; a11++) { for(int A12= 0; A12 <= 4; a12++) {if(a0+a1+a2+a3+a4+a5+a6+a7+a8+a9+a10+a11+a12== 13)                                                        {ans++;                                            }                                                    }                                                }                                }                                        }                                    }         }                            }                        }                    }                }            } }} printf ("%d\n", ans);return0;}

2015 Blue Bridge Cup: 7. Number of card types

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.