You are viewing a single comment's thread. Return to all comments →
If you are here because the discription doesn't match the results, you gotta consider that a tower can be reduced directly to 1. example:
2 towers of height 7
p1: 7 -> 1 (x=1 y=6 -> x divides y)
p2: 7 -> 1 (x=1 y=6 -> x divides y)
p1 loses
p2 wins, therefore returns p2
the description says that y should divide x but in reality x should divide y
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Tower Breakers
You are viewing a single comment's thread. Return to all comments →
If you are here because the discription doesn't match the results, you gotta consider that a tower can be reduced directly to 1. example:
2 towers of height 7
p1: 7 -> 1 (x=1 y=6 -> x divides y)
p2: 7 -> 1 (x=1 y=6 -> x divides y)
p1 loses
p2 wins, therefore returns p2
the description says that y should divide x but in reality x should divide y