Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static BigInteger recSum(BigInteger val, BigInteger moddiv, BigInteger result){
- if(moddiv.compareTo(val) == 1){
- return result;
- }else{
- val = val.mod(moddiv);
- moddiv = moddiv.multiply(BigInteger.valueOf(10));
- result = result.add(recSum(val, moddiv, result));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement