[Solved] why i multiply many number make a mistake when i division?


According to wolfram alpha, the result is

117288381359406970983270

However in java the largest number an int can store is

2147483647

And even a long integer, which is 64 bits can only hold

9223372036854775807

To get around this, you will need to use some form of big number class. See this question for some ways of doing so.

To summarise that linked question, you can use the big integer class from java.math to get around this:

BigInteger result = new BigInteger("117288381359406970983270");

It also includes functions to add and multiply BigIntegers.

3

solved why i multiply many number make a mistake when i division?