zoukankan      html  css  js  c++  java
  • POJ 1001: Exponentiation

    import java.math.*;
    import java.util.*;
    
    class Main {
        public static void main(String[] args) {
            Scanner cin=new Scanner(System.in);
            while(cin.hasNext()){
                BigDecimal r=cin.nextBigDecimal();
                int n=cin.nextInt();
                BigDecimal ans= r.pow(n);
                ans=ans.stripTrailingZeros();
                String astring=ans.toPlainString();
                if(astring.startsWith("0."))astring=astring.substring(1);
                System.out.println(astring);
            }
        }
    }
    View Code
  • 相关阅读:
    angular安装指定版本
    Fluttter通过按钮来打开抽屉Drawer或者endDrawer
    angular中的animation动画
    flutter pubspec.yaml配置文件详解
    angular-cli卸载安装
    angular的项目基本配置的了解
    angular使用代理解决跨域
    IOS开发之UI布局
    用Objective-C写了一个简单的批量更改文件名的程序
    使用Objective-C 计算代码运行时间
  • 原文地址:https://www.cnblogs.com/Rhythm-/p/9336728.html
Copyright © 2011-2022 走看看