euler 76 and 78 are very similar. i thought it would be a piece of cake. just have to use BigInteger instead of int
76
using BigInteger and adding one
this answer is correct
78
this returns 5997, and the System.out.println says 3000000
the correct answer is 55374
i tried changing
System.out.println(ways[j]);
to
System.out.println(ways[j].toString());
but get the same answer
i am guessing
if(ways[j].mod(limit) == BigInteger.ZERO)
is where the problem is, but not sure