cho.sh
Notes
Loading...

Maximum Product

Time limit

2s

Memory limit

128 MB

Problem

Given integers S and K, choose K positive integers whose sum is S. Among all possible choices, find the maximum possible product of the chosen integers.

Input

The first line contains two integers S and K.

  • K is at most 20.
  • S is at most 100.
  • K is less than or equal to S.

Output

Print the maximum possible product. The answer is less than 9223372036854775807.