September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -1,11 +1,11 @@
|
|||
import java.math.BigInteger;
|
||||
|
||||
class Program {
|
||||
class IntegerPower {
|
||||
public static void main(String[] args) {
|
||||
BigInteger x = BigInteger.valueOf(5).pow(BigInteger.valueOf(4).pow(BigInteger.valueOf(3).pow(2).intValue()).intValue());
|
||||
String y = x.toString();
|
||||
int l = y.length();
|
||||
System.out.printf("5**4**3**2 = %s...%s and has %d digits\n",
|
||||
y.substring(0,20), y.substring(l-20), l);
|
||||
BigInteger power = BigInteger.valueOf(5).pow(BigInteger.valueOf(4).pow(BigInteger.valueOf(3).pow(2).intValueExact()).intValueExact());
|
||||
String str = power.toString();
|
||||
int len = str.length();
|
||||
System.out.printf("5**4**3**2 = %s...%s and has %d digits%n",
|
||||
str.substring(0, 20), str.substring(len - 20), len);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue