Massive Numbers
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
The number is called massive if it is represented in the form a^n, which means a raised in power n. You need to compare two massive numbers a^b
and c^d
, written in the form "base^exponent".
Given two massive numbers, print the biggest one.
Input
Two massive numbers a and b in the form "base^exponent" (1 ≤ base, exponent ≤ 1000). It is known that the values of a and b are different.
Output
Print the biggest number among a and b.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 7K
Acceptance rate 37%