#Lutece1036. C(i,j) and F(x,y)
C(i,j) and F(x,y)
Migrated from Lutece 1036 C(i,j) and F(x,y)
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
There are tow function, and ;
Fuction C(i,j)=[j*(j-1)*(j-2)*....*(j-i+1)]/[1*2*3....*i].
Fuction F(x,y)can be caculator by following code
int F(long long x,long long y)
{
int tot=0;
while(x%y==0)
{
tot++;
x=x/y;
}
return tot;
}
Please find out answer of following function:
$max((F(C(1,m), t), F(C(2,m), t),F(C(3,m), t),\cdots,F(C(m-1,m), t),F(C(m,m),t))$
Since the answer could be very large. you just need to find ,that is the largest one.
Input
tow nunmber
It is guranteed that is a prime number, and can be divided by with no remainder.
Output
One number , (If there are mutiple solution, just output the larget one)
Samples
3 6
5
37 62123
50652
Resources
The 13th UESTC Programming Contest Preliminary