|Online MIPT programming contest||РУССКИЙ|
Time limit = 3Find the number of lucky tickets with 2n digits in a number system with base q. A ticket is lucky if its number has 2n digits, with sums of the first n and the last n being equal.
Input consists of two numbers n and q, with 1 ≤ n ≤ 200 and 2 ≤ q ≤ 16.
Output the number of lucky tickets.
© acm.mipt DevGroup
The page was generated in 170ms