HDU 1042 大数
发布时间:2021-01-24 05:16 所属栏目:[大数据] 来源:网络整理
导读: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! ?
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 1 2 3? Sample Output 1 2 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比较高级 别人封装好了的 去记单词吧 【免责声明】本站内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。 |
推荐文章
热点阅读