JAVA
EnjoyingAC
bugger,写bug爱好者。
展开
-
toPlainString()和stripTrailingZeros()
toPlainString() //转为普遍计数法输出//给一个字符串1.238761976E-10//如何得到0.0000000001238761976这个字符串呢?BigDecimal bd = new BigDecimal("1.238761976E-10"); System.out.println(bd.toPlainString());stripTrailingZer...原创 2018-05-04 10:28:57 · 7114 阅读 · 0 评论 -
【JAVA大数】大明A+B HDU - 1753
题目链接大明A+B HDU - 1753题目话说,经过了漫长的一个多月,小明已经成长了许多,所以他改了一个名字叫“大明”。 这时他已经不是那个只会做100以内加法的那个“小明”了,现在他甚至会任意长度的正小数的加法。 现在,给你两个正的小数A和B,你的任务是代表大明计算出A+B的值。 Input 本题目包含多组测试数据,请处理到文件结束。 每一组测试数据在一行里面包含...原创 2018-05-04 10:34:30 · 134 阅读 · 0 评论 -
【JAVA大数】Hat's Fibonacci HDU - 1250
题目链接Hat’s Fibonacci HDU - 1250题目A Fibonacci sequence is calculated by adding the previous two members the sequence, with the first two members being both 1. F(1) = 1, F(2) = 1, F(3) = 1,F(4) =...原创 2018-05-04 10:46:02 · 118 阅读 · 0 评论 -
【JAVA大数】1sting HDU - 1865
题目链接1sting HDU - 1865题目You will be given a string which only contains ‘1’; You can merge two adjacent ‘1’ to be ‘2’, or leave the ‘1’ there. Surly, you may get many different results. For exampl...原创 2018-05-04 11:09:48 · 162 阅读 · 0 评论 -
【JAVA大数&&递推】Children’s Queue HDU - 1297
题目链接Children’s Queue HDU - 1297题目There are many students in PHT School. One day, the headmaster whose name is PigHeader wanted all students stand in a line. He prescribed that girl can not be in...原创 2018-05-04 22:24:48 · 230 阅读 · 0 评论 -
【JAVA大数&&卡特兰数】Buy the Ticket HDU - 1133
题目链接Buy the Ticket HDU - 1133题目The “Harry Potter and the Goblet of Fire” will be on show in the next few days. As a crazy fan of Harry Potter, you will go to the cinema and have the first sigh...原创 2018-05-05 11:43:55 · 163 阅读 · 0 评论 -
【JAVA大数&&模拟】Lovekey HDU - 2100
题目链接Lovekey HDU - 2100题目XYZ-26进制数是一个每位都是大写字母的数字。 A、B、C、…、X、Y、Z 分别依次代表一个0 ~ 25 的数字,一个 n 位的26进制数转化成是10进制的规则如下 A0A1A2A3…An-1 的每一位代表的数字为a0a1a2a3…an-1 ,则该XYZ-26进制数的10进制值就为 m = a0 * 26^(n-1) + a1 ...原创 2018-05-05 16:22:21 · 223 阅读 · 0 评论 -
JAVA大数专题训练
HDU 1002 A + B Problem II输入A和B,按要求输出A+B的和。练手题。 题解HDU 1042 N!求N的阶乘。练手题。 题解HDU 1753 大明A+B小数的加法,BigDecimal的运用。 需要去掉尾数0和用普遍计数法输出。 题解HDU 1250 Hat’s Fibonacci给定递推公式,要求第n项的值。练手题。 题解...原创 2018-05-05 16:37:23 · 149 阅读 · 0 评论