标签:[] lin F12 one scan c代码 generated int() ack
输入N(1 <= N <= 10000)
输出N的阶乘
5
120
1 import java.math.BigInteger; 2 import java.util.Scanner; 3 4 5 public class sss { 6 7 /** 8 * @param args 9 */ 10 public static void main(String[] args) { 11 // TODO Auto-generated method stub 12 Scanner in=new Scanner(System.in); 13 BigInteger sum=BigInteger.ONE; 14 int n; 15 n=in.nextInt(); 16 for(int i=1;i<=n;i++) 17 sum=sum.multiply(BigInteger.valueOf(i)); 18 System.out.println(sum); 19 } 20 }
标签:[] lin F12 one scan c代码 generated int() ack
原文地址:http://www.cnblogs.com/ECJTUACM-873284962/p/7235614.html