Description
Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many computer systems.
 
 
This problem requires that you write a program to compute the exact value of Rn where R is a real number ( 0.0 < R < 99.999 ) and n is an integer such that 0 < n <= 25.
Input
The input will consist of a set of pairs of values for R and n. The R value will occupy columns 1 through 6, and the n value will be in columns 8 and 9.
Output
The output will consist of one line for each line of input giving the exact value of R^n. Leading zeros should be suppressed in the output. Insignificant trailing zeros must not be printed. Don't print the decimal point if the result is an integer.
Sample Input
95.123  12 0.4321  20 5.1234  15 6.7592   9 98.999  10 1.0100  12
Sample Output
548815620517731830194541.899025343415715973535967221869852721 .00000005148554641076956121994511276767154838481760200726351203835429763013462401 43992025569.928573701266488041146654993318703707511666295476720493953024 29448126.764121021618164430206909037173276672 90429072743629540498.107596019456651774561044010001 1.126825030131969720661201
 
 
 
 
public String substring(int beginIndex)
返回一个新的字符串,它是此字符串的一个子字符串。
该子字符串从指定索引处的字符开始,
直到此字符串末尾。
示例: 
  "unhappy".substring(2) returns "happy"
  "Harbison".substring(3) returns "bison"
  "emptiness".substring(9) returns "" (an empty string)
参数:
beginIndex - 起始索引(包括)。 
返回:
指定的子字符串。 
抛出: 
IndexOutOfBoundsException - 如果 beginIndex 为负或大于此 String 对象的长度。
 
 
substring
public String substring(int beginIndex,int endIndex)
返回一个新字符串,它是此字符串的一个子字符串。
该子字符串从指定的 beginIndex 处开始,直到索引 endIndex - 1 处的字符。
因此,该子字符串的长度为 endIndex-beginIndex。 
示例: 
  "hamburger".substring(4, 8) returns "urge"
  "smiles".substring(1, 5) returns "mile"
参数:
beginIndex - 起始索引(包括)。
endIndex - 结束索引(不包括)。 
返回:
指定的子字符串。 
抛出: 
IndexOutOfBoundsException - 如果 beginIndex 为负,或 endIndex 大于此 String 对象的长度,
或 beginIndex 大于 endIndex。
 
 
 

poj1001 Exponentiation 大数的幂的更多相关文章

  1. Problem F: Exponentiation大数求幂

    DescriptionProblems involving the computation of exact values of very large magnitude and precision ...

  2. poj1001 Exponentiation【java大数】

    Exponentiation Time Limit: 500MS   Memory Limit: 10000K Total Submissions: 183034   Accepted: 44062 ...

  3. [POJ] #1001# Exponentiation : 大数乘法

    一. 题目 Exponentiation Time Limit: 500MS   Memory Limit: 10000K Total Submissions: 156373   Accepted: ...

  4. 大数低速幂运算模板(c++)+python大数幂

    简介 自己从大数加法改过来的模板,低速计算n的t次幂,n,t小于等于100速度能够保证 模板 #include <bits/stdc++.h> using namespace std; s ...

  5. POJ 1001 Exponentiation 模拟小数幂

    模拟小数幂 小数点位 pos 非零末位 e 长度 len 只有三种情况 pos > len pos < e e < pos < len #include <iostrea ...

  6. hdu 1063 Exponentiation 大数

    Problem Description Problems involving the computation of exact values of very large magnitude and p ...

  7. POJ 1001 Exponentiation(大数运算)

    POJ 1001 Exponentiation 时限:500 ms   内存限制:10000 K 提交材料共计: 179923   接受: 43369 描述:求得数R( 0.0 < R < ...

  8. POJ-1001 Exponentiation 高精度算法

    题目链接:https://cn.vjudge.net/problem/POJ-1001 以前写过一个高精度乘法,但是没有小数点,实现起来也没什么难得, 现在把代码都般过来,等会把旧电脑弄一弄,暂时就不 ...

  9. poj1001 Exponentiation

    Description Problems involving the computation of exact values of very large magnitude and precision ...

随机推荐

  1. JS中取整以及随机颜色问题

    前言:感觉自己已经好久好久没有写博客了,最近都是在写在线笔记比较多.现在来到新公司了,昨天刚刚完成一个项目所以今天有空研究研究一下前端方面的技术.下午在看一个游戏代码的时候,发现了几个别人留下的不错的 ...

  2. mysql 时间函数转换

    1 NOW() //当前时间 2 SYSDATE() //当前时间 3 CURRENT_TIMESTAMP 4 以'YYYY-MM-DD HH:MM:SS'或YYYYMMDDHHMMSS格式返回当前的 ...

  3. iOS中sqlite版本号

    https://github.com/yapstudios/YapDatabase/wiki/SQLite-version-(bundled-with-OS) https://github.com/y ...

  4. 操作系统开发系列—13.c.进程之中断重入

    现在又出现了另外一个的问题,在中断处理过程中是否应该允许下一个中断发生? 让我们修改一下代码,以便让系统可以在时钟中断的处理过程中接受下一个时钟中断.这听起来不是个很好的主意,但是可以借此来做个试验. ...

  5. spring.net (3)依赖注入基础

    属性的注入: 在上篇例子中已经出现并解释过: <object id="dog" type="SpringDemo.Dog,SpringDemo" sing ...

  6. android deep link(深度链接)与自定义协议!

    此自定义仅供参考! 首先打开androidManifest.xml 在MainActivity中添加如下内容: <activity android:name=".MainActivit ...

  7. 初学HTML 常见的标签(一) 文本标签

    最近做iOS开发的过程中, 发现要涉及到JS和原生OC(Swift)的交互, 作为一个Developer, 本着克服一切问题的原则, 开始学习HTML, 在这里记录下自己的学习笔记, 方便以后的复习, ...

  8. 让shell脚本在后台飞

    1. 使用&符号在后台执行命令 你可以在Linux命令或者脚本后面增加&符号,从而使命令或脚本在后台执行,例如:. $ ./my-shell-script.sh & 2. 使用 ...

  9. Sublime Text 收藏笔记

    Sublime Text:初学者不知道的那些事 转载自: http://blog.jobbole.com/23949/

  10. 分享 | Git常用的一些命令

    最近,各个项目团队已经全面从svn转向Git 近期将会分享一些Git的常用操作及使用经验: 先了解下工作中一些需要用到的命令: --------------------------- Git基本常用命 ...