CF-High School: Become Human

29 篇文章 0 订阅
17 篇文章 0 订阅

High School: Become Human

Year 2118. Androids are in mass production for decades now, and they do all the work for humans. But androids have to go to school to be able to solve creative tasks. Just like humans before.

It turns out that high school struggles are not gone. If someone is not like others, he is bullied. Vasya-8800 is an economy-class android which is produced by a little-known company. His design is not perfect, his characteristics also could be better. So he is bullied by other androids.

One of the popular pranks on Vasya is to force him to compare x^y with y^x. Other androids can do it in milliseconds while Vasya’s memory is too small to store such big numbers.

Please help Vasya! Write a fast program to compare x^y with y^x for Vasya, maybe then other androids will respect him.

Input

On the only line of input there are two integers x and y (1≤x,y≤10^9 ).

Output

If x^y < y^x, then print ‘<’ (without quotes). If xy>yx, then print ‘>’ (without quotes). If x^y=y^x
, then print ‘=’ (without quotes).

Examples

Input
5 8
Output
>
Input
10 3
Output
<
Input
6 6
Output
=

Note

In the first example 58=5⋅5⋅5⋅5⋅5⋅5⋅5⋅5=390625, and 85=8⋅8⋅8⋅8⋅8=32768. So you should print ‘>’.In the second example 103=1000<310=59049.In the third example 66=46656=66.

题目大意:

输入x和y,比较x的y次幂与y的x次幂的大小。前者大则输出‘>’,后者大则输出‘<’,否则输出‘=’。

思路:

数学题,对这两个数分别取对数log2,然后利用log()函数即可。
代码如下:

#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main()
{
  double x,y;
  while(cin>>x>>y)
  {
  double m=log(x),n=log(y);
  double x1=m/x,y1=n/y;
  if(x1==y1)cout<<'='<<endl;
  else if(x1>y1)cout<<'>'<<endl;
  else cout<<'<'<<endl;
}
  return 0;
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值