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. swiper在vue中正确的使用方法

    1.安装swiper,执行npm install vue-awesome-swiper --save命令 2.在main.js中添加下面三行 import 'swiper/dist/css/swipe ...

  2. 【memcached的常用操作】

    memcache是一个KEY-VALUE存储缓存数据库,常用作网站数据请求的存储; 提供多种API: 语法简单类似于redis; #设置一个键值存储 #添加一个键值存储 #获取键值 #删除键值 #清空 ...

  3. C++11 initializer_list 和 Range-based for loop 学习理解

    win10 + vs2017 源码如下: int main() { vector< int > numbers = { 1, 2, 3, 4, 5 }; for (auto num : n ...

  4. Selenium_python自动化环境搭建篇

    説 明: 本篇随笔讲解Selenium+python自动化环境的搭建,此随笔暂不介绍Selenium3,Selenium3需要考虑环境依赖驱动等相关问提比较多一篇随笔没法説完,所以暂不介绍,当然你可以 ...

  5. Makefile:(实验)多个目标匹配时会采用最完整匹配的目标

    结论源自实验测试,如果有疏漏希望指出 当Makefile中存在多个匹配的目标时,Makefile会采用哪个匹配的目标呢? 测试的Makefile如下: .PHONY: all clean quick_ ...

  6. 20155207王雪纯 2006-2007-2 《Java程序设计》第二周学习总结

    20155207王雪纯 2006-2007-2 <Java程序设计>第二周学习总结 教材学习内容总结 整数类型:short(占2字节).int()占4字节.long(占8字节) " ...

  7. 20155313 2016-2017-2 《Java程序设计》第一周学习总结

    20155313 2016-2017-2 <Java程序设计>第一周学习总结 教材学习内容总结 本周的Java学习进入了一个全新的阶段,对于我这样的并没有每天花费时间钻研的同学来说,最后几 ...

  8. [arc065E]Manhattan Compass[曼哈顿距离和切比雪夫距离转换]

    Description 传送门 Solution 题目要求的是曼达顿距离,对于每个点(x,y),我们把它变为(x-y,x+y),就可以转换成求切比雪夫距离了. 证明如下:$max(\left | (x ...

  9. django使用流程

    1.安装django包 (命令行)>pip install django # conda install django 2.安装成功后,可以新建django项目 1(命令行)>django ...

  10. 二分查找的C#实现

    二分查找也称折半查找(Binary Search),它是一种效率较高的查找方法.但是,折半查找要求线性表必须采用顺序存储结构,而且表中元素按关键字有序排列. 查找过程 首先,假设表中元素是按升序排列, ...