sgu-112(java 大数)
2013-03-14 20:36
253 查看
import java.util.*; import java.math.*; public class Solution { public static void main(String args[]){ Scanner in=new Scanner(System.in); int a=in.nextInt(); int b=in.nextInt(); BigInteger x=BigInteger.valueOf(a); BigInteger y=BigInteger.valueOf(b); x=x.pow(b); y=y.pow(a); System.out.println(x.subtract(y)); } }
相关文章推荐
- sgu 112 a^b - b^a java大数
- SGU 407 Number of Paths in the Empire dp+java大数
- 快速切题 sgu 111.Very simple problem 大数 开平方 难度:0 非java:1
- 快速切题 sgu 112. a^b-b^a 大数 次方 难度:0 非java:1
- (高精度运算4.7.29)SGU 112 a^b - b^a(大数的幂运算)
- sgu111-112大数运算
- SGU 208 Toral Tickets(Polya计数+Java大数)
- sgu-111-111. Very simple problem(java大数)
- SGU - 112 - ab-ba (大数高精度)
- java 大数题用BigInteger类,就很简单了
- poj1503java大数
- JAVA应试技巧----大数开方
- java 大数运算
- nyoj 803 A/B Problem 【Java大数】
- 424 Integer Inquiry(Java大数)
- Java常用类库--大数处理类--BigInteger
- 今天来打打java大数模板(整型)
- java大数操作
- POJ 2506 Tiling(大数递推&&(数组模拟||JAVA))
- 【Java大数】hdu 5429 Geometric Progression