Code example for BigInteger

Methods: multiply

0
        System.out.println(cnt);
    } 
     
    private static BigInteger comb(int n, int r) {
 
        return cache[n].divide(cache[r].multiply(cache[n-r]));
         
    } 
 
    private static BigInteger fact(int n) {
 
        BigInteger mul = new BigInteger("1");
         
        for(int i=1; i<=n; i++) {
             
            mul = mul.multiply(new BigInteger(String.valueOf(i)));
             
        } 
 
        return mul;
    }