Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
import java.math.BigInteger;
|
||||
|
||||
// Variable definitions
|
||||
BigInteger _5, _4, powResult;
|
||||
_5 = BigInteger.valueOf(5);
|
||||
_4 = BigInteger.valueOf(4);
|
||||
|
||||
//calculations
|
||||
powResult = _5.pow(_4.pow(9).intValueExact());
|
||||
String powStr = powResult.toString();
|
||||
int powLen = powStr.length();
|
||||
String powStrStart = powStr.substring(0, 20);
|
||||
String powStrEnd = powStr.substring(powLen - 20);
|
||||
|
||||
//output
|
||||
System.out.printf("5**4**3**2 = %s...%s and has %d digits%n", powStrStart, powStrEnd, powLen);
|
||||
Loading…
Add table
Add a link
Reference in a new issue