Responsive image

问题 G: Jacana Number

问题 G: Jacana Number

时间限制: 2 Sec  内存限制: 128 MB
提交: 1  解决: 1
[提交][状态][讨论版][命题人:]

题目描述

This problem is very simple problem.
We define J(n,k) like this:
1. J(n,1)=n
2. J(n,k)=n^(J(n,k−1) ) , (k=2,3,…) 
We call this number “Jacana Number”.
In this problem you are given two jacana numbers and you must output which Jacana Number is greater than the other.
 

输入描述

The first line contains an integer T (1 <= T <= 10000), the number of test cases.
Each test case contains four integers n, a, m, b (1 <= n, a, m, b <= 10^9)
 

输出描述

For each test case output one of (‘>’, ‘=’, ‘<’) in one line.
If J(n,a)> J(m,b), output ‘>’.
If J(n,a)= J(m,b), output ‘=’.
If J(n,a)< J(m,b), output ‘<’.
 

样例输入

3
2 2 3 1
2 3 3 2
1 2 1 4

样例输出

>
<
=
[提交][状态]
ACM算法攻关部