Choose Team With Captain

Choose Team With Captain

Medium Computer Mathematics Combinatorics 27 views
Explanation Complexity

Problem Statement

Choose r people from n and also pick a captain from chosen team.

Input Format

Two integers n r.

Output Format

One integer.

Example

5 3
30

Constraints

0

Input / Output Format

Input Format
Two integers n r.
Output Format
One integer.
Constraints
0

Examples

Input:
5 3
Output:
30

Example Solution (Public)

Computer Mathematics
Ways = C(n,r)*r. First choose team, then captain among r.

Official Solution Code

Ways = C(n,r)*r. First choose team, then captain among r.
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.