题意:

如标题。

方法:

简单高精度。。。

代码(继续JAVA 水过)

 import java.util.*;
import java.math.*;
public class Solution {
public static void main(String[] args){
Scanner cin=new Scanner(System.in);
int a=cin.nextInt(),b=cin.nextInt();
BigInteger s,t;
s=BigInteger.valueOf(a).pow(b);
t=BigInteger.valueOf(b).pow(a);
System.out.print(s.subtract(t));
}
}

SGU 112.a^b - b^a的更多相关文章

  1. 快速切题 sgu 112. a^b-b^a 大数 次方 难度:0 非java:1

    112. a^b-b^a time limit per test: 0.25 sec. memory limit per test: 4096 KB You are given natural num ...

  2. a^b-b^a - SGU 112(高精度快速幂)

    分析:直接上吧,建议不要使用模板,否则没啥意义了. 代码如下: ==================================================================== ...

  3. 高精度 - SGU 112 a^b-b^a

    a^b-b^a Problem's Link Mean: 略 analyse: 简单题,只用编个高精度乘法和减法即可. Time complexity: O(N) view code  java im ...

  4. SGU题目总结

    SGU还是个不错的题库...但是貌似水题也挺多的..有些题想出解法但是不想写代码, 就写在这里吧...不排除是我想简单想错了, 假如哪位神犇哪天发现请告诉我.. 101.Domino(2015.12. ...

  5. SGU 分类

    http://acm.sgu.ru/problemset.php?contest=0&volume=1 101 Domino 欧拉路 102 Coprime 枚举/数学方法 103 Traff ...

  6. Entity Framework 6 Recipes 2nd Edition(11-2)译 -> 用”模型定义”函数过滤实体集

    11-2. 用”模型定义”函数过滤实体集 问题 想要创建一个”模型定义”函数来过滤一个实体集 解决方案 假设我们已有一个客户(Customer)和票据Invoice)模型,如Figure 11-2所示 ...

  7. backup log is terminating abnormally because for write on file failed: 112(error not found)

    昨天遇到一个案例,YourSQLDba做事务日志备份时失败,检查YourSQLDba输出的错误信息如下: <Exec> <ctx>yMaint.backups</ctx& ...

  8. DBCC CHECKDB 遭遇Operating system error 112(failed to retrieve text for this error. Reason: 15105) encountered

    我们一个SQL Server服务器在执行YourSQLDBa的作业YourSQLDba_FullBackups_And_Maintenance时遇到了错误: Exec YourSQLDba.Maint ...

  9. Write on ……… failed: 112(failed to retrieve text for this error. Reason: 15105)

    早上检查数据库的备份邮件时,发现一台Microsoft SQL Server 2008 R2 (SP2)数据库的Maintenance Report有错误 在SSMS里面执行Exec YourSQLD ...

随机推荐

  1. HDU -- 4496

    D-City Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Subm ...

  2. 游戏开发设计模式之对象池模式(unity3d 示例实现)

    前篇:游戏开发设计模式之命令模式(unity3d 示例实现) 博主才学尚浅,难免会有错误,尤其是设计模式这种极富禅意且需要大量经验的东西,如果哪里书写错误或有遗漏,还请各位前辈指正. 原理:从一个固定 ...

  3. 【索引】Objective-C基础教程-读书笔记

    第1章 启程 http://www.cnblogs.com/duxiuxing/p/5492219.html 第2章 对C的扩展 第3章  面向对象编程的基础知识 第4章 继承 第5章 复合 第6章 ...

  4. Using QEMU for Embedded Systems Development

    http://www.opensourceforu.com/2011/06/qemu-for-embedded-systems-development-part-1/ http://www.opens ...

  5. UVA 10106 (13.08.02)

     Product  The Problem The problem is to multiply two integers X, Y. (0<=X,Y<10250) The Input T ...

  6. java_method_readFile读取文件文本txt

    /** * @Title: TxtAndCsvUtils.java * @Package cn.com.qmhd.tools * @Description: TODO(读取txt和CSV文档) * @ ...

  7. HIVE自定义函数 UDF

    自定义my_md5hash 具体hive源码怎么调用看我另外一篇博客 package udf.hive.myudf; import org.apache.commons.codec.digest.Di ...

  8. 【转】Handler+ExecutorService(线程池)+MessageQueue模式+缓存模式

    http://www.cnblogs.com/wanqieddy/archive/2013/09/06/3305482.html android线程池的理解,晚上在家无事 预习了一下android异步 ...

  9. Android UI学习 - GridView和ImageView的使用

    GridView: A view that shows items in two-dimensional scrolling grid. The items in the grid come from ...

  10. Python读写文件需要注意的地方 2015-03-31 23:19 69人阅读 评论(0) 收藏

    <span style="font-family: 'Microsoft YaHei'; background-color: rgb(255, 255, 255);"> ...