2951:浮点数求高精度幂 总时间限制: 1000ms 内存限制: 65536kB 描述 有一个实数 R ( 0.0 < R < 99.999 ) ,要求写程序精确计算 R 的 n 次方.n 是整数并且 0 < n <= 25. 输入 T输入包括多组 R 和 n. R 的值占第 1 到 第 6 列, n 的值占第 8 和第 9 列. 输出 对于每组输入,要求输出一行,该行包含精确的 R 的 n 次方.输出需要去掉前导的 0 后后面不不要的 0 .如果输出是整数,不要输出小数点.…
Exponentiation Time Limit: 500MS Memory Limit: 10000K Total Submissions: 175340 Accepted: 42341 Description Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the n…
题目链接 import java.util.*; import java.math.*; public class Main{ public static void main(String[] args) { Scanner cin = new Scanner(System.in); while (cin.hasNext()) { BigDecimal numa = cin.nextBigDecimal(); int numb = cin.nextInt(); String str = numa…
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…