随笔分类 -  Java的学习 && 大数

摘要:Poker ShuffleTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 226Accepted Submission(s): 78Problem DescriptionJason is not only an ACMer, but also a poker nerd. He is able to do a perfect shuffle. In a perfect shuffle, the deck containing K cards, w 阅读全文
posted @ 2013-10-04 15:12 Jack Ge 阅读(613) 评论(0) 推荐(0) 编辑
摘要:Cut the CakeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 263Accepted Submission(s): 113Problem DescriptionMMM got a big big big cake, and invited all her M friends to eat the cake together. Surprisingly one of her friends HZ took some (N) strawb 阅读全文
posted @ 2013-09-29 13:24 Jack Ge 阅读(788) 评论(0) 推荐(0) 编辑
摘要:TilingTime Limit:1000MSMemory Limit:65536KTotal Submissions:6746Accepted:3291DescriptionIn how many ways can you tile a 2xn rectangle by 2x1 or 2x2 tiles?Here is a sample tiling of a 2x17 rectangle.InputInput is a sequence of lines, each line containing an integer number 0 <= n <= 250.OutputFo 阅读全文
posted @ 2013-06-17 17:13 Jack Ge 阅读(297) 评论(0) 推荐(0) 编辑
摘要:当我配置完Java环境变量后,使用java-version时,发现出现了以下错误然后经过查找资料找到了解决方法,可是原因不明,详见:http://blog.csdn.net/wzju64676266/article/details/5288218出现error:could not open '...jvm.cfg'大多是安装jdk的时候在注册表里注册过,在网上看到很多关于error:could not open '...jvm.cfg'的问题的解决方法,但有些无效,有些比较复杂,最简单的一招是删除"c:/windows/java.exe",w 阅读全文
posted @ 2013-05-13 18:54 Jack Ge 阅读(1470) 评论(0) 推荐(0) 编辑
摘要:(转)http://www.cnblogs.com/XBWer/archive/2012/06/24/2560532.htmlACM中java的使用这里指的java速成,只限于java语法,包括输入输出,运算处理,字符串和高精度的处理,进制之间的转换等,能解决OJ上的一些高精度题目。1. 输入:格式为:Scanner cin = new Scanner (new BufferedInputStream(System.in));例程:import java.io.*;import java.math.*;import java.util.*;import java.text.*;public c 阅读全文
posted @ 2013-03-30 10:34 Jack Ge 阅读(6998) 评论(0) 推荐(2) 编辑
摘要:A + B Problem IITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 149365Accepted Submission(s): 28157 Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.InputThe first line 阅读全文
posted @ 2013-03-30 10:21 Jack Ge 阅读(313) 评论(0) 推荐(0) 编辑
摘要:Hat's FibonacciTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4547Accepted Submission(s): 1544 Problem DescriptionA Fibonacci sequence is calculated by adding the previous two members the sequence, with the first two members being both 1. F(1 阅读全文
posted @ 2013-03-30 10:15 Jack Ge 阅读(333) 评论(0) 推荐(0) 编辑
摘要:N!Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 40204Accepted Submission(s): 11162 Problem DescriptionGiven an integer N(0 ≤ N ≤ 10000), your task is to calculate N!InputOne N in one line, process to the end of file.OutputFor each N, output N! 阅读全文
posted @ 2013-03-30 10:08 Jack Ge 阅读(172) 评论(0) 推荐(0) 编辑
摘要:Children’s QueueTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 8194Accepted Submission(s): 2603 Problem DescriptionThere are many students in PHT School. One day, the headmaster whose name is PigHeader wanted all students stand in a line. He pres 阅读全文
posted @ 2013-03-30 10:01 Jack Ge 阅读(577) 评论(0) 推荐(0) 编辑
摘要:大菲波数Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7677Accepted Submission(s): 2557 Problem DescriptionFibonacci数列,定义如下: f(1)=f(2)=1 f(n)=f(n-1)+f(n-2) n>=3。 计算第n项Fibonacci数值。Input输入第一行为一个整数N,接下来N行为整数Pi(1<=Pi<=1000)。Output输出为N行,每行为对应的f(P 阅读全文
posted @ 2013-03-30 09:44 Jack Ge 阅读(215) 评论(0) 推荐(0) 编辑
摘要:大明A+BTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5747Accepted Submission(s): 1957 Problem Description话说,经过了漫长的一个多月,小明已经成长了许多,所以他改了一个名字叫“大明”。 这时他已经不是那个只会做100以内加法的那个“小明”了,现在他甚至会任意长度的正小数的加法。现在,给你两个正的小数A和B,你的任务是代表大明计算出A+B的值。Input本题目包含多组测试数据,请处理到文件 阅读全文
posted @ 2013-03-30 09:35 Jack Ge 阅读(201) 评论(0) 推荐(0) 编辑
摘要:字串数Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2142Accepted Submission(s): 458 Problem Description一个A和两个B一共可以组成三种字符串:"ABB","BAB","BBA". 给定若干字母和它们相应的个数,计算一共可以组成多少个不同的字符串.Input每组测试数据分两行,第一行为n(1<=n<=26),表示不同字母的 阅读全文
posted @ 2013-03-30 09:23 Jack Ge 阅读(1790) 评论(0) 推荐(0) 编辑
摘要:ExponentiationTime Limit: 1000/500 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4973Accepted Submission(s): 1353 Problem DescriptionProblems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of t 阅读全文
posted @ 2013-03-30 08:45 Jack Ge 阅读(496) 评论(0) 推荐(0) 编辑
摘要:A sequence of numbershttp://acm.hdu.edu.cn/showproblem.php?pid=2817Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1594 Accepted Submission(s): 494 Problem DescriptionXinlv wrote some sequences on the paper a long time ago, they might be arithmet 阅读全文
posted @ 2012-12-28 21:56 Jack Ge 阅读(413) 评论(0) 推荐(0) 编辑
摘要:Integer Inquiryhttp://acm.hdu.edu.cn/showproblem.php?pid=1047Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7564 Accepted Submission(s): 1961 Problem DescriptionOne of the first users of BIT's new supercomputer was Chip Diller. He extended h 阅读全文
posted @ 2012-12-26 19:03 Jack Ge 阅读(319) 评论(0) 推荐(0) 编辑
摘要:N!http://acm.hdu.edu.cn/showproblem.php?pid=1042Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 37977 Accepted Submission(s): 10555 Problem DescriptionGiven an integer N(0 ≤ N ≤ 10000), your task is to calculate N!InputOne N in one line, process 阅读全文
posted @ 2012-12-26 16:55 Jack Ge 阅读(387) 评论(0) 推荐(0) 编辑
摘要:A + B Problem IIhttp://acm.hdu.edu.cn/showproblem.php?pid=1002Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 137421 Accepted Submission(s): 26074 Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to 阅读全文
posted @ 2012-12-26 16:37 Jack Ge 阅读(441) 评论(0) 推荐(0) 编辑
摘要:Exponentiationhttp://poj.org/problem?id=1001Time Limit: 500MSMemory Limit: 10000KTotal Submissions: 111912Accepted: 27180DescriptionProblems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing exper 阅读全文
posted @ 2012-12-25 14:28 Jack Ge 阅读(254) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示