Exponentiation Time Limit: 500MS Memory Limit: 10000K Total Submissions: 126980 Accepted: 30980 Description Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of t…
一. 题目 Exponentiation Time Limit: 500MS Memory Limit: 10000K Total Submissions: 156373 Accepted: 38086 Description Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of…
题目 计算实数a的n次方,具体输出格式看案例 import java.util.*; import java.math.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); BigDecimal a = BigDecimal.ONE; BigDecimal ans = BigDecimal.ONE; int n; while(in.hasNextBi…
题意:求c的n次幂……要求保留所有小数…… 解法:一开始只知道有BigInteger……java大数+模拟.第一次写java大数……各种报错各种exception……ORZ 没有前导0和小数后面的补位0,整数的话不输出小数点,wa点就这些···被整数后面的小数点坑死了··· 代码: 放渣代码…… import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(St…