poj 1001 Exponentiation
来源:互联网 发布:苗阜与姜昆的关系知乎 编辑:程序博客网 时间:2024/05/21 10:44
import java.math.BigDecimal;import java.math.BigInteger;import java.util.Scanner;public class Main { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner in =new Scanner(System.in); while(in.hasNextBigDecimal()) { BigDecimal ans=BigDecimal.ONE; double a=in.nextDouble(); int b=in.nextInt(); int i=1; for(i=1;i<=b;i++) { ans=ans.multiply(BigDecimal.valueOf(a)); } ans=ans.stripTrailingZeros(); String s=ans.toPlainString(); char first=s.charAt(0); if(first=='0') { System.out.println(s.substring(1, s.length())); } else System.out.println(s); } }}
0 0
- POJ 1001 Exponentiation
- POJ 1001 Exponentiation
- poj 1001 Exponentiation
- POJ 1001 "Exponentiation"
- poj 1001 Exponentiation
- POJ 1001 Exponentiation
- poj 1001 exponentiation
- 【POJ】1001 Exponentiation
- POJ 1001 Exponentiation
- poj 1001Exponentiation
- 《POJ 1001》 Exponentiation
- POJ 1001 Exponentiation
- [POJ]1001 Exponentiation
- POJ-1001-Exponentiation
- [poj] 1001 Exponentiation
- POJ 1001 Exponentiation
- poj 1001 Exponentiation
- POJ-1001 Exponentiation 高精度
- opencv--Mat类解析
- Android中设置屏幕全屏两种方法:
- kafka管理器kafka-manager部署安装
- 母函数
- 文件中读取(重定向),随机数生成
- poj 1001 Exponentiation
- 比较正宗的验证邮箱的正则表达式js代码详解
- java关键字transient
- 关系:CGI,FastCGI,PHP-CGI与PHP-FPM
- iOS dSYM文件结构剖析(下)
- vim 缩进设置
- Java实现二维码QRCode的编码和解码
- android常用工具类 --事件
- Android PorterDuff及Xfermode详解