@@ -0,0 +1,1341 @@
+package algorithms.warmup;%0D%0A%0D%0Aimport java.math.BigInteger;%0D%0Aimport java.util.Scanner;%0D%0A%0D%0A/*%0D%0A * Problem Statement: %0D%0A * You are given an integer N. Print the factorial of this number.%0D%0A * %0D%0A * N!=Nx(N-1)x(N-2)x...x3x2x1%0D%0A * Note: Factorials of N%3E20 can't be stored even in a 64-bit long long variable.%0D%0A * Big integers must be used for such calculations. Languages like Java, Python,%0D%0A * Ruby etc. can handle big integers but we need to write additional code in%0D%0A * C/C++ to handle such large values.%0D%0A * %0D%0A * We recommend solving this challenge using BigIntegers.%0D%0A * %0D%0A * Input Format:%0D%0A * Input consists of a single integer N.%0D%0A * %0D%0A * Constraints:%0D%0A * 1 %3C= N %3C= 100%0D%0A * %0D%0A * Output Format:%0D%0A * Output the factorial of N.%0D%0A * %0D%0A * Sample Input:%0D%0A * 25%0D%0A * %0D%0A * Sample Output: %0D%0A * 15511210043330985984000000%0D%0A */%0D%0Apublic class ExtraLongFactorials %7B%0D%0A%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A        Scanner sc = new Scanner(System.in);%0D%0A        int number = sc.nextInt();%0D%0A        sc.close();%0D%0A%0D%0A        calculateAndPrintFactorial(number);%0D%0A    %7D%0D%0A    %0D%0A    static void calculateAndPrintFactorial(int num) %7B%0D%0A        %0D%0A        BigInteger result = BigInteger.ONE;%0D%0A        %0D%0A        for (int i = 1; i %3C= num; i++) %7B%0D%0A            result = result.multiply(BigInteger.valueOf(i));%0D%0A        %7D%0D%0A        System.out.println(result);%0D%0A    %7D%0D%0A%7D

Add ExtraLongFactorials