题目链接:
hdu: http://acm.hdu.edu.cn/showproblem.php?pid=5170
bc(中文):http://bestcoder.hdu.edu.cn/contests/contest_chineseproblem.php?cid=567&pid=1001
题解:
先用java大数幂写的,t了
1 import java.util.*; 2 import java.math.*; 3 public class Main { 4 public static void main(String args[]){ 5 Scanner cin = new Scanner(System.in); 6 BigInteger a,c; 7 int b,d; 8 9 while(cin.hasNext()){ 10 a=cin.nextBigInteger(); 11 b=cin.nextInt(); 12 c=cin.nextBigInteger(); 13 d=cin.nextInt(); 14 15 a=a.pow(b); 16 c=c.pow(d); 17 //四则运算 18 19 if(a.compareTo(c)>0) System.out.println(">"); 20 else if(a.compareTo(c)<0) System.out.println("<"); 21 else System.out.println("="); 22 } 23 } 24 }