The stand answer is actually wrong. This is misleading.


  • 4
    J

    The stand answer is actually wrong. This is misleading.
    For example, take 60 as input, the maximum should be 3^20 = 3486784401. The standard answer gets a much smaller value.


  • 0
    B

    Yes, there seems to be a disconnect between clicking "Run code" and "Submit Answer", at least for javascript. When I would click "Run code" it would appear I had the wrong answer, I finally clicked "Submit Answer" after reading this comment and my answer was accepted. The "Run code" answer is either wrong or the problem statement isn't clear.


  • 0
    A

    It seems that the input must be less than or equal to 58. Starting from 59 OJ will return wrong answer.


  • 0
    B

    No, it is not. Anything greater than 58 will cause int overflow.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.