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. spring4笔记----Spring几种常用的容器后处理器

    PropertyPlaceholderConfigurer  属性占位符配置器 PropertyOverrideConfigureer    重写占位符配置器 CustomAutowireConfig ...

  2. python多线程与多进程--存活主机ping扫描以及爬取股票价格

    python多线程与多进程 多线程: 案例:扫描给定网络中存活的主机(通过ping来测试,有响应则说明主机存活) 普通版本: #扫描给定网络中存活的主机(通过ping来测试,有响应则说明主机存活)im ...

  3. AI学习---数据IO操作&神经网络基础

    数据IO操作 TF支持3种文件读取:    1.直接把数据保存到变量中    2.占位符配合feed_dict使用    3. QueueRunner(TF中特有的) 文件读取流程 文件读取流程(多线 ...

  4. Windows SDK 8安装失败的绕坑办法

    安装win sdk 8,提示错误:管道正在被关闭. 查看安装log文件,有如下错误: Error 0x800700e8: Failed to write message type to pipe.Er ...

  5. 如何激活windows或office

    郑重承诺:该激活软件没有病毒,有任何侵害行为,找我QQ:122317653 Step one: 首先你需要安装KMS Auto Net激活器,但我们都知道一些杀毒软件都会将此类激活器警告成木马病毒,原 ...

  6. SSH 和 Git

    了解SSH SSH 以非对称加密实现身份验证.较常用的非对称加密有 RSA. 两种加密过程: 1.通过用户名密码访问服务器,即使传输的数据是加密的也可能会被劫持到不信任的服务器,泄露用户名和密码. 2 ...

  7. 《Java大学教程》--第3章 迭代

    迭代(iteration).重复(repetition):三种循环* for: 重复执行固定次数* while: 重复执行不固定次数* do...while: 比while至少多一次 1.答:P47迭 ...

  8. vue-cli脚手架搭建的项目怎么去除eslint验证

    修改webpack.base.conf.js这个基础配置文件了.具体修改方法如下: module: { rules: [ ...(config.dev.useEslint ? [createLinti ...

  9. P3399 丝绸之路 dp

    题目背景 张骞于公元前138年曾历尽艰险出使过西域.加强了汉朝与西域各国的友好往来.从那以后,一队队骆驼商队在这漫长的商贸大道上行进,他们越过崇山峻岭,将中国的先进技术带向中亚.西亚和欧洲,将那里的香 ...

  10. 【NOI2019模拟】搬砖

    [NOI2019模拟]搬砖 Description 小火车很穷,只好去搬砖了. 小火车被工头要求搭建\(n\)座塔,第i个高度为\(H_i\),也就是由\(H_i\)块砖头组成.每次小火车可以携带至多 ...