B. High School: Become Human
time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

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.

不知道为什么。。。取对数就莫名wa。。。比较x*logy和y*logx就是错的。。。而比较x/y和logx/logy就是对的。。。。

没考虑到一个问题就是x^y=y^x有可能x!=y....所以应该先判读大于和小于最后否则就是等于,这样就避免了考虑精度问题由于本题是1e9,因此x/y-logx/logy=exp()<=1e-12

一般精度是要高于范围三位

 #include<iostream>
#include<string.h>
#include<stdio.h>
#include<math.h>
using namespace std;
int main(){
int x,y;
while (~scanf("%d%d",&x,&y)){
double a=log(x)/log(y);
double b=x*1.0/y;
if(a>b){
printf(">\n");
}else if(a<b){
printf("<\n");
}
else printf("=\n");
}
return ;
}

Codeforces Round #485 (Div. 2)-B-High School: Become Human的更多相关文章

  1. Codeforces Round #485 (Div. 2)

    Codeforces Round #485 (Div. 2) https://codeforces.com/contest/987 A #include<bits/stdc++.h> us ...

  2. Codeforces Round #485 (Div. 2) D. Fair

    Codeforces Round #485 (Div. 2) D. Fair 题目连接: http://codeforces.com/contest/987/problem/D Description ...

  3. Codeforces Round #485 (Div. 2) F. AND Graph

    Codeforces Round #485 (Div. 2) F. AND Graph 题目连接: http://codeforces.com/contest/987/problem/F Descri ...

  4. Codeforces Round #485 (Div. 2) E. Petr and Permutations

    Codeforces Round #485 (Div. 2) E. Petr and Permutations 题目连接: http://codeforces.com/contest/987/prob ...

  5. Codeforces Round #485 (Div. 2) C. Three displays

    Codeforces Round #485 (Div. 2) C. Three displays 题目连接: http://codeforces.com/contest/987/problem/C D ...

  6. Codeforces Round #485 (Div. 2) A. Infinity Gauntlet

    Codeforces Round #485 (Div. 2) A. Infinity Gauntlet 题目连接: http://codeforces.com/contest/987/problem/ ...

  7. Codeforces Round #485 (Div. 2) C题求三元组(思维)

    C. Three displays time limit per test 1 second memory limit per test 256 megabytes input standard in ...

  8. Codeforces Round #485 Div. 1 vp记

    A:对每种商品多源bfs一下每个点到该商品的最近距离,对每个点sort一下取前s个即可. #include<iostream> #include<cstdio> #includ ...

  9. Codeforces Round #366 (Div. 2) ABC

    Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate ...

随机推荐

  1. Exception in thread "main" java.lang.RuntimeException: Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, do

    继上一篇Hive: Exception in thread "main" java.lang.RuntimeException: Hive metastore database i ...

  2. shell编程—变量(三)

    在shell脚本中,变量分两种,系统变量和自定义变量. 系统默认变量是系统自带的一些变量,如path为路径变量 用户自定义变量为在编写吧脚本的时候自己定义的一些变量 变量名命名规则 首个字符必须为字母 ...

  3. javascript 重要属性之prototype(继承)

    转载猫猫小屋 http://www.maomao365.com/?p=831 在javascript中每一个函数都拥有 prototype属性,在javascript中使用prototype,可以向已 ...

  4. Sqlserver还原master

    net stop mssqlserver net start mssqlserver /m"SQLCMD" sqlcmd -s xx sqlcmd -s xx -U sa -P x ...

  5. memset memcmp memcpy memmove 自己实现

    memset memcmp memcpy memmove 自己实现 memset #include <stdio.h> #include <memory.h> #include ...

  6. Kibana查询

    查询lyad账号操作AD账号的操作: Category:"用户帐户管理" AND SubjectUserName:"lyad" 查询对账号zhangsan进行的 ...

  7. python数据类型练习题

    一.元素分类 有如下值集合 [11,22,33,44,55,66,77,88,99,90...],将所有大于 66 的值保存至字典的第一个key中,将小于 66 的值保存至第二个key的值中.即: { ...

  8. 【CQOI2017】小Q的表格

    [CQOI2017]小Q的表格 稍加推导就会发现\(f(a,b)=a\cdot b\cdot h(gcd(a,b))\). 初始时\(h(n)=1\). 询问前\(k\)行\(k\)列时我们就反演: ...

  9. postgresql命令

    连接数据库, 默认的用户和数据库是postgrespsql -U user -d dbname 切换数据库,相当于mysql的use dbname\c dbname列举数据库,相当于mysql的sho ...

  10. SDOI2016 R1做题笔记

    SDOI2016 R1做题笔记 经过很久很久的时间,shzr终于做完了SDOI2016一轮的题目. 其实没想到竟然是2016年的题目先做完,因为14年的六个题很早就做了四个了,但是后两个有点开不动.. ...