Submit | All submissions | Best solutions | Back to list |
OPNDYSTF - Choosing staff to work on open days |
At university open days, we need to have a certain number of staff available - let's say we need R ambassadors to show people around and greet visitors. There is a pool of N ambassadors that have signed up to work on open days.
On a particular open day, how many possible combinations of R ambassadors can be drawn from a pool of N?
For instance, if we need 2 ambassadors and there are 3 signed up (N=3, R=2) the answer would be 3.
Input
A single line of text with two integers, N and R. R<N<200
Output
A single integer representing the number of possible combinations of ambassadors.
Example
Input: 10 3 Output: 120
Added by: | handee |
Date: | 2020-06-13 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |