public static void main(String[] args) {
int sum = 1;
for (int i = 1; i <=30; i++) {
sum *= i;
}
System.out.println(sum);
BigInteger b = new BigInteger("1");
for (int i = 1; i <=30; i++) {
BigInteger b1 = new BigInteger(i+"");
b =b.multiply(b1);
}
System.out.println(b); |
|