1 import java.math.*; 2 import java.util.Scanner; 3 4 5 public class Main{ 6 public static void main(String[] args){ 7 int a; 8 Scanner cin = new Scanner(System.in); 9 while(cin.hasNext()) 10 { 11 BigInteger ans=BigInteger.ONE; 12 a=cin.nextInt(); 13 for(int i=1;i<=a;i++) 14 { 15 ans=ans.multiply(BigInteger.valueOf(i)); 16 } 17 System.out.println(ans); 18 } 19 } 20 }
时间: 2024-10-22 06:30:42