Calculate occurrence of an element in factorial of a number
ull legendre ( ull factor , ull num ) { ull count = 0 , fac2 = factor ; while ( num >= factor ) { count += num / factor ; factor *= fac2 ; } return count ; } bool possible ( map < ull , int > & factors , ull num ) {