[ad_1]
See the doc, it should be used this way:
public BigInteger mod(BigInteger m)
public BigInteger divide(BigInteger val)
You can change it to this:
factorialans.mod(BigInteger.valueOf(10))
and
factorialans.divide(BigInteger.TEN)
[ad_2]
solved counting the zeros in the the factorial number, please the check the error