SGU 112.a^b - b^a
题意:
如标题。
方法:
简单高精度。。。
代码(继续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的更多相关文章
- 快速切题 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 ...
- a^b-b^a - SGU 112(高精度快速幂)
分析:直接上吧,建议不要使用模板,否则没啥意义了. 代码如下: ==================================================================== ...
- 高精度 - SGU 112 a^b-b^a
a^b-b^a Problem's Link Mean: 略 analyse: 简单题,只用编个高精度乘法和减法即可. Time complexity: O(N) view code java im ...
- SGU题目总结
SGU还是个不错的题库...但是貌似水题也挺多的..有些题想出解法但是不想写代码, 就写在这里吧...不排除是我想简单想错了, 假如哪位神犇哪天发现请告诉我.. 101.Domino(2015.12. ...
- SGU 分类
http://acm.sgu.ru/problemset.php?contest=0&volume=1 101 Domino 欧拉路 102 Coprime 枚举/数学方法 103 Traff ...
- Entity Framework 6 Recipes 2nd Edition(11-2)译 -> 用”模型定义”函数过滤实体集
11-2. 用”模型定义”函数过滤实体集 问题 想要创建一个”模型定义”函数来过滤一个实体集 解决方案 假设我们已有一个客户(Customer)和票据Invoice)模型,如Figure 11-2所示 ...
- backup log is terminating abnormally because for write on file failed: 112(error not found)
昨天遇到一个案例,YourSQLDba做事务日志备份时失败,检查YourSQLDba输出的错误信息如下: <Exec> <ctx>yMaint.backups</ctx& ...
- 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 ...
- Write on ……… failed: 112(failed to retrieve text for this error. Reason: 15105)
早上检查数据库的备份邮件时,发现一台Microsoft SQL Server 2008 R2 (SP2)数据库的Maintenance Report有错误 在SSMS里面执行Exec YourSQLD ...
随机推荐
- 对于利用pca 和 cca 进行fmri激活区识别的理解
1.pca 抛开fmri研究这个范畴,我们有一个超长向量,这个超长向量在fmri研究中,就是体素数据.向量中的每个数值,都代表在相应坐标轴下的坐标值.这些坐标轴所组成的坐标系,其实是标准单位坐标系.向 ...
- Quality in the Test Automation Review Process and Design Review Template
About this document Prerequisite knowledge/experience: Software Testing, Test Automation Applicable ...
- pm grant 命令
CustomLocale.apk所需要的权限"android.permission.CHANGE_CONFIGURATION"自Android 4.2,4.2.2起系统定义为and ...
- 【狼】unity3d collision获取碰撞的点的位置
void OnCollisionEnter(Collision ctl) { ContactPoint contact = ctl.contacts[]; Quaternion rot = Quate ...
- 简单tableView的使用
UITableView是一个用于显示列表的视图,可以作为子视图镶嵌在主视图上,可以滑动,选取各种参数 定义: @interface ViewController : UIViewController& ...
- SQL Server阻止了对组件xp_cmdshell过程的解决方案
使用SQL tools连接sqlserver时候出现以下问题: SQL Server阻止了对组件xp_cmdshell过程的解决方案错误描述:SQL Server阻止了对组件‘xp_cmdshell’ ...
- UVa 10029 hash + dp
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem& ...
- zoj 2100 Seeding
Seeding Time Limit: 2 Seconds Memory Limit: 65536 KB It is spring time and farmers have to plan ...
- VMware workstation12 pro安装Ubuntu14.04LTS过程笔记
由于近期需要加强自己在Linux/C++编程方面的需要,把原来的CentOS6.5格了....在windows8.1系统上重新安装了VMware和Ubuntu... VMware安装Ubuntu的过程 ...
- 子元素margin-top属性传递给父元素的问题 转!
问题描述:一个父包含框包含一个子元素.给正常流的子元素一个垂直外边距margin-top就会使得父元素跟着往下走,而子元素和父元素的边距则没有发生变化. html结构:<div class=&q ...