Advertisement
TLE

623

TLE
Apr 9th, 2014
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import java.io.*;
  2. import java.util.*;
  3. import java.math.*;
  4.  
  5. class main {
  6. public static void main (String args[]) {
  7. Scanner sc = new Scanner(System.in);
  8. while(true){
  9. int n= sc.nextInt();
  10. BigInteger fac = BigInteger.valueOf(1);
  11. for(int i=1; i<=n; i++){
  12. fac = fac.multiply(BigInteger.valueOf(i));
  13. }
  14. System.out.println(n+"!");
  15. System.out.println(fac);
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement