AtCoder Beginner Contest 078 - HEX

In programming, hexadecimal notation is often used.
In hexadecimal notation, besides the ten digits 0, 1, ..., 9, the six letters A, B, C, D, E and F are used to represent the values 10, 11, 12, 13, 14 and 15, respectively.
In this problem, you are given two letters X and Y. Each X and Y is A, B, C, D, E or F.
When X and Y are seen as hexadecimal numbers, which is larger?

-----Constraints-----
 - Each X and Y is A, B, C, D, E or F.

-----Input-----
Input is given from Standard Input in the following format:
X Y

-----Output-----
If X is smaller, print <; if Y is smaller, print >; if they are equal, print =.

-----Sample Input-----
A B

-----Sample Output-----
<

10 < 11.

Source: atcoder | Difficulty: EASY


Solutions:
(a, b) = input().split()
if a > b:
	print('>')
if a == b:
	print('=')
if a < b:
	print('<')


(x, y) = map(str, input().split())
print('<' if x < y else '=' if x == y else '>')


(X, Y) = input().split()
print('<' if Y > X else '>' if X > Y else '=')


(X, Y) = input().split()
print(['=', '>', '<'][X > Y or -(X < Y)])


(x, y) = input().split()
if x > y:
	print('>')
if x < y:
	print('<')
if x == y:
	print('=')


(X, Y) = [int('0x' + i, base=16) for i in input().split()]
if X > Y:
	print('>')
elif X < Y:
	print('<')
else:
	print('=')


(X, Y) = map(str, input().split())
print('<' if X < Y else '>' if Y < X else '=')


(x, y) = input().split()
print(['<', '=', '>'][(x > y) + (x >= y)])


(A, B) = input().split()
print('=') if A == B else print('<>'[A > B])


x = list(map(str, input().split()))
if x[0] > x[1]:
	print('>')
elif x[0] < x[1]:
	print('<')
else:
	print('=')


import bisect, collections, copy, heapq, itertools, math, string
import sys

def I():
	return int(sys.stdin.readline().rstrip())

def LI():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def S():
	return sys.stdin.readline().rstrip()

def LS():
	return list(sys.stdin.readline().rstrip().split())
A = LS()
X = A[0]
Y = A[1]
if X < Y:
	print('<')
elif X == Y:
	print('=')
else:
	print('>')


(X, Y) = input().split()
if X > Y:
	ans = '>'
elif X < Y:
	ans = '<'
else:
	ans = '='
print(ans)


(x, y) = input().split()
if x < y:
	print('<')
elif x == y:
	print('=')
else:
	print('>')


(x, y) = (i for i in input().split())
print('<' if x < y else '>' if x > y else '=')


(s, t) = input().split()
if s < t:
	print('<')
elif s > t:
	print('>')
else:
	print('=')


print((lambda x: '>' if x[0] > x[1] else '<' if x[0] < x[1] else '=')(input().split()))


(a, b) = input().split()
ans = '<' if a < b else '=' if a == b else '>'
print(ans)


(a, b) = input().split()
if a < b:
	print('<')
elif a == b:
	print('=')
else:
	print('>')


import math
(a, b) = input().split()
print('<' if a < b else '>' if a > b else '=')


(x, y) = input().split()
print('<' if ord(x) < ord(y) else '>' if ord(x) > ord(y) else '=')


(X, Y) = map(ord, input().split())
ans = '<' if X < Y else '>' if X > Y else '='
print(ans)


print(['<', '>', '='][(lambda lis: (lis[0] == lis[1]) * 2 + (lis[0] > lis[1]))(input().split())])


(x, _, y) = list(input())
print('=><'[(x > y) | -(x < y)])


(x, y) = input().split()
x = int(x, 16) - int(y, 16)
print('>' if x > 0 else ['=', '<'][x < 0])


(a, b) = input().split()
print(['<>'[a > b], '='][a == b])


l = list(input().split())
if len(set(l)) == 1:
	print('=')
elif l == sorted(l):
	print('<')
else:
	print('>')


(a, b) = map(ord, input().split())
print('=' if a == b else '>' if a > b else '<')


(x, _, y) = input()
print('=><'[(x > y) - (x < y)])


(a, b) = map(str, input().split())
print('>' if a > b else '<' if a < b else '=')


(X, Y) = input().split()
x_i = ord(X)
y_i = ord(Y)
if x_i < y_i:
	print('<')
elif x_i > y_i:
	print('>')
else:
	print('=')


(x, y) = map(lambda x: int(x, 16), input().split())
print('<' if x < y else '>' if x > y else '=')


(X, Y) = map(str, input().split())
if X < Y:
	ans = '<'
elif X > Y:
	ans = '>'
else:
	ans = '='
print(ans)


data = list(input().split())
if data[0] < data[1]:
	print('<')
elif data[0] > data[1]:
	print('>')
else:
	print('=')


(a, b) = input().split()
print(['<', '=', '>'][min(2, max(0, 1 + int(a, 16) - int(b, 16)))])


def alp_num(alp):
	alp_lst = list('ABCDEF')
	num = alp_lst.index(alp)
	return num

def main():
	(x, y) = map(str, input().split())
	num1 = alp_num(x)
	num2 = alp_num(y)
	if num1 < num2:
		com_ope = '<'
	elif num1 == num2:
		com_ope = '='
	else:
		com_ope = '>'
	print(com_ope)

def __starting_point():
	main()
__starting_point()


(a, b) = input().split()
print([['>', '='][ord(a) == ord(b)], '<'][ord(a) < ord(b)])


(x, y) = map(ord, input().split())
print('=' * (x == y) or ['>', '<'][x < y])


(a, s) = input().split()
print('=') if a == s else print('<') if a < s else print('>')


(x, y) = map(str, input().split())
if int(ord(x)) < int(ord(y)):
	ans = '<'
elif int(ord(x)) > int(ord(y)):
	ans = '>'
else:
	ans = '='
print(ans)


(a, b) = input().split()
c = int(a, 16)
d = int(b, 16)
print('>' if c > d else '<' if c < d else '=')


(x, y) = list(map(str, input().split()))
dict_num = {'A': 10, 'B': 11, 'C': 12, 'D': 13, 'E': 14, 'F': 15}
if dict_num[x] == dict_num[y]:
	print('=')
elif dict_num[x] > dict_num[y]:
	print('>')
else:
	print('<')


(X, Y) = [x for x in input().split()]
if ord(X) < ord(Y):
	print('<')
elif ord(X) == ord(Y):
	print('=')
else:
	print('>')


(x, y) = list(map(str, input().split()))
if x == y:
	print('=')
elif x < y:
	print('<')
else:
	print('>')


(S, T) = input().split()
if S < T:
	print('<')
elif S > T:
	print('>')
else:
	print('=')


(x, y) = list(map(ord, input().split()))
if x > y:
	print('>')
elif x == y:
	print('=')
else:
	print('<')


(a, b) = input().split()
dict = {'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5}
a = dict[a]
b = dict[b]
if a < b:
	ans = '<'
elif b < a:
	ans = '>'
else:
	ans = '='
print(ans)


print('<<<<<=>>>>>'[(lambda a, b: a - b)(*map(ord, input().split())) + 5])


(A, B) = list(map(str, input().split()))
lis = ['A', 'B', 'C', 'D', 'E', 'F']
if lis.index(A) < lis.index(B):
	print('<')
elif lis.index(A) == lis.index(B):
	print('=')
else:
	print('>')


(A, B) = input().split()
if ord(A) > ord(B):
	print('>')
elif ord(A) < ord(B):
	print('<')
else:
	print('=')


a = input().split()
b = sorted(a)
if a != b:
	print('>')
elif a[0] == a[1]:
	print('=')
else:
	print('<')


(x, y) = map(str, input().split())
if ord(x) > ord(y):
	print('>')
elif x == y:
	print('=')
else:
	print('<')


import math
(X, Y) = input().split()
X = ord(X)
Y = ord(Y)
if X == Y:
	print('=')
elif X > Y:
	print('>')
else:
	print('<')


array = ['A', 'B', 'C', 'D', 'E', 'F']
(X, Y) = input().split()
print('<') if array.index(X) < array.index(Y) else print('>') if array.index(X) > array.index(Y) else print('=')


import sys
sys.setrecursionlimit(10 ** 6)
(x, y) = list(map(str, input().split()))
x = int('0x' + x, 16)
y = int('0x' + y, 16)
if x > y:
	print('>')
elif x == y:
	print('=')
else:
	print('<')


(X, Y) = input().split()
alphabet = ['A', 'B', 'C', 'D', 'E', 'F']
x_i = 0
y_i = 0
for i in range(6):
	if alphabet[i] == X:
		x_i = i
	if alphabet[i] == Y:
		y_i = i
if x_i < y_i:
	print('<')
elif x_i > y_i:
	print('>')
else:
	print('=')


(X, Y) = input().split()
ans = '='
if X < Y:
	ans = '<'
if X > Y:
	ans = '>'
print(ans)


(x, y) = map(str, input().split())
print('=><'[x > y or -(x < y)])


(X, Y) = map(ord, input().split())
if X > Y:
	print('>')
elif X < Y:
	print('<')
else:
	print('=')


(a, b) = input().split()
a = a.replace('A', '10').replace('B', '11').replace('C', '12').replace('D', '13').replace('E', '14').replace('F', '15')
b = b.replace('A', '10').replace('B', '11').replace('C', '12').replace('D', '13').replace('E', '14').replace('F', '15')
if int(a) == int(b):
	print('=')
elif int(a) > int(b):
	print('>')
elif int(a) < int(b):
	print('<')


(x, y) = list(map(str, input().split()))
l = ['A', 'B', 'C', 'D', 'E', 'F']
print(['=', '<', '>'][l.index(y) > l.index(x) or -(l.index(y) < l.index(x))])


(A, B) = (ord(x) for x in input().split())
if A < B:
	print('<')
elif A > B:
	print('>')
else:
	print('=')


def iroha():
	(a, b) = input().split()
	exmap = {'A': 10, 'B': 11, 'C': 12, 'D': 13, 'E': 14, 'F': 15}
	aa = exmap[a]
	bb = exmap[b]
	if aa < bb:
		print('<')
	elif aa > bb:
		print('>')
	else:
		print('=')

def __starting_point():
	iroha()
__starting_point()


(A, B) = input().split()
print('<=>'[(A > B) + (A >= B)])


(x, y) = input().split()
print('=<>'[x < y or -(y < x)])


(n, m) = map(str, input().split())
if n > m:
	print('>')
elif n < m:
	print('<')
else:
	print('=')


(X, _, Y) = input()
if X > Y:
	print('>')
elif X < Y:
	print('<')
else:
	print('=')


(x, y) = map(lambda x: int(x, 16), input().split())
ans = '='
if x < y:
	ans = '<'
elif x > y:
	ans = '>'
print(ans)


(x, y) = map(str, input().split())
al = list('ABCDEF')
x = al.index(x)
y = al.index(y)
if x > y:
	print('>')
elif x < y:
	print('<')
else:
	print('=')


(X, Y) = input().split()
print(['><'[X < Y::2], '='][X == Y])


(a, b) = map(ord, input().split())
print(['=', '<', '>'][(a < b) + (a > b) * 2], end='')


from collections import Counter, defaultdict, deque
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right
import sys, math, itertools, fractions
sys.setrecursionlimit(10 ** 8)
mod = 10 ** 9 + 7
INF = float('inf')

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))
(a, b) = input().split()
if a < b:
	print('<')
elif a > b:
	print('>')
else:
	print('=')


import math
(x, y) = input().split()
print('<' if x < y else '>' if x > y else '=')


(a, b) = input().split()
print('=><'[a > b or -(a < b)])


(X, Y) = input().split()
temp = 'ABCDEF'
if temp.index(X) > temp.index(Y):
	print('>')
elif temp.index(X) == temp.index(Y):
	print('=')
else:
	print('<')


(X, Y) = input().split()
print('<=>'[(X > Y) + (X >= Y)])


(n, m) = input().split()
if n > m:
	print('>')
elif n < m:
	print('<')
else:
	print('=')


(A, B) = input().split()
mydict = {'A': 10, 'B': 11, 'C': 12, 'D': 13, 'E': 14, 'F': 15}
print('>') if mydict[A] > mydict[B] else print('<') if mydict[A] < mydict[B] else print('=')


(X, Y) = input().split()
if X < Y:
	print('<')
elif X == Y:
	print('=')
elif X > Y:
	print('>')


(n, m) = [ord(i) for i in input().split()]
n -= m
print(['<', '>'][n > 0] if n else '=')


import sys
(X, Y) = sys.stdin.readline().strip().split()
if X == Y:
	print('=')
elif X < Y:
	print('<')
else:
	print('>')


(X, Y) = (int(X, 16) for X in input().split())
print((X < Y) * '<' + (X == Y) * '=' + (X > Y) * '>')


def main():
	(a, b) = input().split(' ')
	if a > b:
		print('>')
	elif a < b:
		print('<')
	else:
		print('=')
main()


s = input().split()
print('<' if s[0] < s[1] else '>' if s[0] > s[1] else '=')


lst = input().split()
X = lst[0]
Y = lst[1]
lst.sort()
if X == Y:
	print('=')
elif X == lst[0]:
	print('<')
else:
	print('>')


(a, b) = input()[0::2]
print('<' if a < b else '>' if a > b else '=')


A = 1
B = 2
C = 3
D = 4
E = 5
F = 6
(X, Y) = input().split()
if X < Y:
	print('<')
elif X > Y:
	print('>')
elif X == Y:
	print('=')


(x, y) = list(map(str, input().split()))
alp = ['A', 'B', 'C', 'D', 'E', 'F']
if alp.index(x) < alp.index(y):
	print('<')
elif alp.index(x) > alp.index(y):
	print('>')
else:
	print('=')


(N, A) = map(str, input().split())
print('>' if N > A else '<' if N < A else '=')


(x, y) = input().split()
ans = '='
if x < y:
	ans = '<'
elif x > y:
	ans = '>'
print(ans)


(A, B) = map(str, input().split())
if A > B:
	print('>')
elif A < B:
	print('<')
else:
	print('=')


(x, y) = map(str, input().split())
if x < y:
	print('<')
elif x > y:
	print('>')
elif x == y:
	print('=')


(x, y) = input().split()
print('=' if x == y else '<>'[x > y::2])


(n, m) = input().split()
print(['=', ['<', '>'][n > m]][n != m])