Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.util.*;
- import java.math.*;
- class main {
- public static void main (String args[]) {
- Scanner sc = new Scanner(System.in);
- while(true){
- int n= sc.nextInt();
- BigInteger fac = BigInteger.valueOf(1);
- for(int i=1; i<=n; i++){
- fac = fac.multiply(BigInteger.valueOf(i));
- }
- System.out.println(n+"!");
- System.out.println(fac);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement