poj 1131java大数类
来源:互联网 发布:有没有自动关机软件 编辑:程序博客网 时间:2024/05/16 15:51
import java.math.*;import java.util.Scanner;public class Main {/** * @param args */public static void main(String[] args) {// TODO Auto-generated method stubScanner input = new Scanner(System.in);BigDecimal one = new BigDecimal(1), eight = new BigDecimal(8);String str;while (input.hasNext()) {BigDecimal ans = new BigDecimal(0);BigDecimal a = one.divide(eight);str = input.next();for (int i = 2; i < str.length(); i++) {ans = ans.add(a.multiply(new BigDecimal(str.charAt(i) - 48)));a = a.divide(eight);}System.out.println(str + " [8]" + " = " + ans.toString() + " [10]");}}}
- poj 1131java大数类
- poj 1001 java大数类
- poj 2305 java大数类
- poj 1220 java大数类
- Java大数 poj 1001
- poj 1001 Exponentiation JAVA大数
- POJ 1131 Octal Fractions (Java大数,八进制转十进制)
- POJ 1503 Integer Inquiry【大数相加 java】
- poj 3101 Astronomy (大数java)
- poj 2506 递推+Java大数
- POJ 1001 Exponentiation(大数幂Java实现)
- poj 3197 Continuous Fractions(java大数)
- Exponentiation(POJ-1001) Java大数例题
- poj 3101 Astronomy 分数lcm+大数java
- [POJ](2506)Tiling ---递推+Java大数
- Java大数类解决大数加法
- java 大数类
- JAVA大数类练手
- Qt学习之路(48): 自定义委托
- Webservice开发必备工具
- [转]SQL Server 2005 设置字符集以及更改排序规则
- 逻辑思考决定命运
- ubuntu 下配置NFS,samba, telnet,TFTP,ftp,DHCP服务
- poj 1131java大数类
- 拿铁效应:前星巴克副总裁为什么跑去做移动应用?
- Java编程中“为了性能”尽量要做到的一些地方
- 转 云中漫步的 电子书 from simon
- 推桌子
- .net JS获取控件ID
- CentOS5.7安装oracle
- SQL Server 2008中输出字符串并换行的方法
- Android的“垃圾回收机制”---智能指针(android refbase类(sp wp))