Lotto
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
A popular lottery operates under the following rules: from a set of N balls, K balls are randomly selected as the winning combination. Players win if they correctly predict this exact set of balls. Calculating the number of C combinations for choosing K balls from a set of N balls is straightforward.
Write a program to determine the exact number of balls, K, that need to be selected from a set of N balls, given that the number of combinations is C.
Input
The input consists of a single line with two numbers: N and C (1 ≤ N ≤ 500000).
Output
The output should be a single line containing the number K, which is the number of balls that need to be selected.
Examples
Input #1
Answer #1
Submissions 13