Happy Singles Day

Source: Internet
Author: User

Happy Singles Day
Singles Day happy time limit: 1000 MS | memory limit: 65535 KB difficulty: 2 Description

Today is Singles Day. Smart NS comes up with an activity to enrich this Singles Day.

The rules are as follows:

Each bachelor writes a name of the girl you like on a piece of paper, and then loads the paper into a box. These sticks extract one piece of paper in sequence. If the name above is the girl you like, then the host called the girl at the scene to tell her the affection of the bachelor, and let the bachelor confess on the spot and get the blessing of everyone on the scene, you will be spared.

Suppose there are a total of N bachelors, M of which have not drawn their own paper, and how many possibilities are there for this situation ..

Each input line contains two integers N and M (1 Sample Input
2 23 2
Sample output
13




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.