题目链接:

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 }
View Code

相关文章:

  • 2021-11-05
  • 2021-08-31
  • 2022-01-22
  • 2021-09-10
  • 2021-08-24
  • 2022-12-23
  • 2021-11-02
  • 2021-12-21
猜你喜欢
  • 2021-05-22
  • 2022-12-23
  • 2021-07-26
  • 2021-06-21
  • 2021-10-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案