#K62262. Palette Combinations Calculator
Palette Combinations Calculator
Palette Combinations Calculator
You are given two integers n and k. Your task is to compute the number of ways to choose k different colors from a palette of n distinct colors. The answer is given by the combination formula:
For example, when n = 5 and k = 3, the answer is 10. Your solution must read the input from the standard input (stdin) and print the result to the standard output (stdout).
inputFormat
The input consists of a single line containing two space-separated integers n and k, where:
- n represents the total number of distinct colors.
- k represents the number of colors to select.
outputFormat
Output a single integer, which is the value of \(\binom{n}{k}\), representing the number of combinations.
## sample5 3
10