Extraordinarily Large

4.3

22 votes
Problem

You need to handle two extraordinarily large integers. The good news is that you don't need to perform any arithmetic operation on them. You just need to compare them and see whether they are equal or one is greater than the other.

Given two strings x and y, print either "x< y"(ignore space, editor issues), "x>y" or "x=y" depending on the values represented by x and y. x and y each consist of a decimal integer followed zero or more '!' characters. Each '!' represents the factorial operation. For example, "3!!" represents 3!! = 6! = 720.

Input - First line of input contains no. of testcases and each test consist of 2 lines x and y.

Ouptut - Print the required output.

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?