You are viewing a single comment's thread. Return to all comments →
Mine in Java
import java.io.*; import java.util.*; import java.math.*; public class Solution { public static void main(String[] args) { int n = (new Scanner(System.in)).nextInt(); BigInteger factorial = new BigInteger("1"); while (n>1){ factorial = factorial.multiply(BigInteger.valueOf(n)); n--; } System.out.println(factorial); } }
Seems like cookies are disabled on this browser, please enable them to open this website
Extra Long Factorials
You are viewing a single comment's thread. Return to all comments →
Mine in Java