Multifactorial - 2
Very easy
Execution time limit is 0.5 seconds
Runtime memory usage limit is 64 megabytes
In this problem, you are tasked with calculating the m-fold factorial of a number k. Let's review how to compute m-fold factorials, denoted as F. For this, we define t_{i} = k - mi. The following formula applies:
Input
The first line contains two non-negative integers: m and k (1 ≤ m ≤ 100, 1 ≤ k ≤ 50000).
Output
Output a single line with the number of digits in the m-fold factorial of the number k.
Examples
Input #1
Answer #1
Submissions 46
Acceptance rate 43%