All problems

Picking a Project Team

easyPythonCombinatorics

A manager at Whetcode needs a few people to co-lead the next project, drawn from her team. Everybody on the team is eligible, nobody can be picked twice, and the co-leads share a single title - there is no first or second lead, so a group is the same group however you happen to list its members.

Before she starts weighing personalities she wants to know how many distinct groups she is actually choosing between, because that decides whether this is an afternoon's thought or a week's. Team sizes and the number of co-leads differ from project to project, so the count has to be worked out from the two figures she supplies.

Task: Print how many different co-lead groups can be formed, as a single integer.

Input

The first line holds the size of the team, a whole number of at least 1. The second line holds how many co-leads are wanted, a whole number between 1 and the team size.

Output

One line holding the number of distinct groups, as a plain integer - 56, never 56.0.

Example:

Input:
8
3

Output:
56

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…