HDU 1042 大数
发布时间:2020-12-14 01:40:46 所属栏目:大数据 来源:网络整理
导读:N! Time Limit: 10000/5000 MS (Java/Others)????Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 74633????Accepted Submission(s): 21696 Problem Description Given an integer N(0 ≤ N ≤ 10000),your task is to calculate N! ? In
N!Time Limit: 10000/5000 MS (Java/Others)????Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 74633????Accepted Submission(s): 21696
Problem Description
Given an integer N(0 ≤ N ≤ 10000),your task is to calculate N!
?
Input
One N in one line,process to the end of file.
?
Output
For each N,output N! in one line.
?
Sample Input
?
Sample Output
import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()){ BigInteger a = sc.nextBigInteger(); BigInteger b = sc.nextBigInteger(); System.out.println(a.multiply(b)); } } }// 大数用java 没办法谁叫别人JAVA比较高级 别人封装好了的 去记单词吧 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |