11
3
This question is tricky (and in particular harder than Which big number is bigger?), for those who like more challenging puzzles.
Input
Integers a1, a2, a3, a4, a5, b1, b2, b3, b4, b5 each in the range 1 to 10.
Output
True if a1^(a2^(a3^(a4^a5))) > b1^(b2^(b3^(b4^b5))) and False otherwise.
^ is exponentiation in this question.
Rules
This is code-golf. Your code must terminate correctly within 10 seconds for any valid input on TIO. If your language is not on TIO, the code should finish under 10 seconds on your machine.
You can output anything Truthy for True and anything Falsey for False.
Test cases
Recall that by the rules of exponentiaon, a1^(a2^(a3^(a4^a5))) == a1^a2^a3^a4^a5.
10^10^10^10^10 > 10^10^10^10^9
1^2^3^4^5 < 5^4^3^2^1
2^2^2^2^3 > 10^4^3^2^2
6^7^8^9^10 is not bigger than 6^7^8^9^10
10^6^4^2^2 < 10^6^2^4^2
2^2^2^2^10 > 2^2^2^10^2
10^9^8^7^6 < 6^7^8^9^10
3^1^10^10^10 > 2^1^10^10^10
9^10^10^10^10 < 10^9^10^10^10
New test cases from Kevin Cruijssen
[10,10,10,10,10, 10,10,10,10,9] #true
[2,2,2,2,3, 10,4,3,2,2] #true
[2,2,2,2,10, 2,2,2,10,2] #true
[10,10,10,10,10, 9,10,10,10,10] #true
[3,2,2,1,1, 2,5,1,1,1] #true
[2,2,3,10,1, 2,7,3,9,1] #true
[7,9,10,10,10, 6,9,10,10,10] #true
[3,2,2,2,2, 2,2,2,2,2] #true
[8,3,1,2,1, 2,2,3,1,1] #true
[2,4,2,1,1, 3,3,2,1,1] #true
[5,4,3,2,1, 1,2,3,4,5] #true
[1,2,3,4,5, 5,4,3,2,1] #false
[6,7,8,9,10, 6,7,8,9,10] #false
[10,6,4,2,2, 10,6,2,4,2] #false
[10,9,8,7,6, 6,7,8,9,10] #false
[1,10,10,10,10, 1,10,10,10,9] #false
[2,4,1,1,1, 2,2,2,1,1] #false
[2,2,2,1,1, 2,4,1,1,1] #false
[2,5,1,1,1, 3,2,2,1,1] #false
[4,2,1,1,1, 2,4,1,1,1] #false
[2,4,1,1,1, 4,2,1,1,1] #false
[2,3,10,1,1, 8,3,9,1,1] #false
[8,3,9,1,1, 2,3,10,1,1] #false
[2,4,1,1,1, 3,3,1,1,1] #false
[2,2,1,9,9, 2,2,1,10,10] #false
[2,2,1,10,10, 2,2,1,9,9] #false
[1,1,1,1,1, 1,2,1,1,1] #false
5I'm VTC'ing this, even though it isn't a dupe; it's just too close to a challenge you posted 4 hours prior and shows a lack of effort to think up unique challenges. – Magic Octopus Urn – 2019-04-25T18:37:20.173
1@MagicOctopusUrn Can I politely but firmly disagree? a) this question now has this at the top "question may already have an answer here:" which is just completely wrong. Solutions to the linked question are completely incorrect for this problem. Solutions to this question will be in no way competitive for the linked question. b) Second, it's not a lack of effort! There are two completely different questions you can ask on the same topic and I thought that was really interesting. You may not find it interesting but that's a different issue. – Anush – 2019-04-25T18:47:34.197
3I feel like 9 people agreed on my point with their votes; but, as you say, it's your choice to keep it even though it has 9 downvotes. Was just shedding some light on why there may be downvotes. – Magic Octopus Urn – 2019-04-25T18:49:04.907
@MagicOctopusUrn I couldn't delete it even if I wanted to could I? The question received a number of downvotes before I improved it. For example, I didn't realise there was a restricted-time tag for example which looks perfect for this question. But however you slice it, "This question may already have an answer here:" is simply factually incorrect. – Anush – 2019-04-25T18:50:00.523
@MagicOctopusUrn How is it incorrectly used? I simply copied the model from https://codegolf.stackexchange.com/questions/182202/next-number-with-k-fives .
– Anush – 2019-04-25T18:51:46.5233Was just my two cents man, honestly; we don't need to go into detail here. Regret I even said anything; the last thing I wanted was an argumentative response. I was just stating why I gave a -1. – Magic Octopus Urn – 2019-04-25T18:51:50.770
7
I'm voting to reopen this post because it has different difficulty parameter and the required approach to solve it is very different. Meta post.
– user202729 – 2019-04-26T09:29:34.3973Suggested test cases (for the edge cases encountered by the Python, Ruby, Java, and 05AB1E answers) – Kevin Cruijssen – 2019-05-17T11:27:14.590