![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 7143 阅读 · 0 评论 -
【JAVA大数】大明A+B HDU - 1753
题目链接 大明A+B HDU - 1753 题目 话说,经过了漫长的一个多月,小明已经成长了许多,所以他改了一个名字叫“大明”。 这时他已经不是那个只会做100以内加法的那个“小明”了,现在他甚至会任意长度的正小数的加法。 现在,给你两个正的小数A和B,你的任务是代表大明计算出A+B的值。 Input 本题目包含多组测试数据,请处理到文件结束。 每一组测试数据在一行里面包含...原创 2018-05-04 10:34:30 · 149 阅读 · 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 · 122 阅读 · 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 · 164 阅读 · 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 · 244 阅读 · 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 · 170 阅读 · 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 · 234 阅读 · 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 · 157 阅读 · 0 评论