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 xyxy with yxyx. 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 xyxy with yxyx for Vasya, maybe then other androids will respect him.

Input

On the only line of input there are two integers xx and yy (1≤x,y≤1091≤x,y≤109).

Output

If xy<yxxy<yx, then print '<' (without quotes). If xy>yxxy>yx, then print '>' (without quotes). If xy=yxxy=yx, then print '=' (without quotes).

Examples
input

Copy
5 8
output

Copy
>
input

Copy
10 3
output

Copy
<
input

Copy
6 6
output

Copy
=
Note

In the first example 58=5⋅5⋅5⋅5⋅5⋅5⋅5⋅5=39062558=5⋅5⋅5⋅5⋅5⋅5⋅5⋅5=390625, and 85=8⋅8⋅8⋅8⋅8=3276885=8⋅8⋅8⋅8⋅8=32768. So you should print '>'.

In the second example 103=1000<310=59049103=1000<310=59049.

In the third example 66=46656=6666=46656=66.

题目意思:给你两个数x, y, 比较 x^y 和 y ^ x 的大小

解题思路:首先看看这个x^y的表达式是不是很熟悉,是不是就是高数里面的幂指函数,那么想一想我们在幂指函数求导等操作中是怎么做的,没错就是取对数!!利用ln将幂指函数抬起!!

例如:xy  = e ln (x^y) =  e y(ln x)   。(也可以使用lg,以10为底的对数,把下面代码里面的log10()改为log()即可

这里我在对log ()函数进行一下说明。

double log (double); 以e为底的对数
double log10 (double);c++中自然对数函数:log(N)   以10为底:log10(N)但没有以2为底的函数但是可以用换底公式解 决:log2(N)=log10(N)/log10(2)

 #include<cstdio>
#include<cmath>
const int eps=1e-;
int main()
{
int x,y;
double a,b;
scanf("%d%d",&x,&y);
a=log10(x)*y;
b=log10(y)*x;
if(fabs(a-b)<=eps)
{
printf("=\n");
}
else if(a-b<)
{
printf("<\n");
}
else
{
printf(">\n");
}
return ;
}

High School: Become Human(数学思维)的更多相关文章

  1. 程序设计中的数学思维函数总结(代码以C#为例)

    最近以C#为例,学习了程序设计基础,其中涉及到一些数学思维,我们可以巧妙的将这些逻辑问题转换为代码,交给计算机运算. 现将经常会使用到的基础函数做一总结,供大家分享.自己备用. 1.判断一个数是否为奇 ...

  2. PJ考试可能会用到的数学思维题选讲-自学教程-自学笔记

    PJ考试可能会用到的数学思维题选讲 by Pleiades_Antares 是学弟学妹的讲义--然后一部分题目是我弄的一部分来源于洛谷用户@ 普及组的一些数学思维题,所以可能有点菜咯别怪我 OI中的数 ...

  3. UVa10025 The ? 1 ? 2 ? ... ? n = k problem 数学思维+规律

    UVa10025 ? 1 ? 2 ? ... ? n = k problem The problem Given the following formula, one can set operator ...

  4. B. Tell Your World(几何数学 + 思维)

    B. Tell Your World time limit per test 1 second memory limit per test 256 megabytes input standard i ...

  5. hdu 4710 Balls Rearrangement (数学思维)

    意甲冠军:那是,  从数0-n小球进入相应的i%a箱号.然后买一个新的盒子. 今天的总合伙人b一个盒子,Bob试图把球i%b箱号. 求复位的最小成本. 每次移动的花费为y - x ,即移动前后盒子编号 ...

  6. F. Multicolored Markers(数学思维)

    思维:思维就是将大的矩形放在小矩形里面,让大矩形的宽和长尽量靠近. 很容易得到 (a+b)% i = 0 的话, 保证了大矩形的形成,同时里面表示了两种情况:1, a % i =0, b % i=0; ...

  7. Pythagorean Triples毕达哥斯拉三角(数学思维+构造)

    Description Katya studies in a fifth grade. Recently her class studied right triangles and the Pytha ...

  8. HDU - 6409:没有兄弟的舞会(数学+思维)

    链接:HDU - 6409:没有兄弟的舞会 题意: 题解: 求出最大的 l[i] 的最大值 L 和 r[i] 的最大值 R,那么 h 一定在 [L, R] 中.枚举每一个最大值,那么每一个区间的对于答 ...

  9. Wannafly交流赛1 B 硬币[数学思维/贪心]

    链接:https://www.nowcoder.com/acm/contest/69/B来源:牛客网 蜥蜴的生日快到了,就在这个月底! 今年,蜥蜴的快乐伙伴之一壁虎想要送好多个1元硬币来恶整蜥蜴. 壁 ...

随机推荐

  1. iOS audio不支持循环播放

    解决办法:监听播放完成事件(注意点,audio标签不能设置循环播放,去除标签 loop="loop"或者 loop="false",不然不走播放完成事件) $( ...

  2. 如何使用gitbash 把你的代码托管到github

    1.如果你没有创建仓库 mkdir vuex-playList cd vuex-playList git init touch README.md git add README.md git comm ...

  3. pomelo vscode 调试配置

    步骤 config/server.js 配置 .vscode/launch.json 配置 详细 1. 在server的配置中添加 args 参数,此参数为node开启此服务器时命令参数 " ...

  4. svn文件管理

    将VS2010工程提交给Git管理时需要哪些文件:    *.h  *.cpp  *.sln  *.vcxproj  *.vcxproj.filters  *.qrc以及Resources目录下的资源 ...

  5. Python图形界面Tk

    最近在学习Python,在使用Tkinter做图形界面时遇到了几个小问题,网上查了一下,在Python2.x导入的是Tkinter,Python3则是tkinter.而且导入的simpledialog ...

  6. pyhton习题20190201

    #20190131'''检查ipV4的有效性,有效则返回True,否则返回False,(提示使用split函数进行分割)'''import osdef print_ping_ip(ip): s = o ...

  7. Enable CSS active pseudo styles in Mobile Safari

    http://alxgbsn.co.uk/2011/10/17/enable-css-active-pseudo-styles-in-mobile-safari/ document.addEventL ...

  8. SSM-CRUD入门项目——新增与校验

    新增 分析: 在Index.jsp页面点击新增,弹出对话框(模态框) 数据库查询部门列表显示在模态框中 用户输入数据完成操作 我们先把模态框构建出来,并对新增按钮添加事件,点击按钮弹出模态框: < ...

  9. 随笔三 安装Linux操作系统

    一.虚拟机安装Ubuntu图文教程]在自己笔记本上安装Linux操作系统 我参考了VirtualBox虚拟机安装Ubuntu的图文教程,根据图片和所附内容一步步的将虚拟机安装到位,没看安装教程之前完全 ...

  10. day 6 返回值,参数

    1.函数返回值 In [3]: def divid(a,b): ...: shang = a//b ...: yushu = a%b ...: return shang,yushu ...: In [ ...