Ad
  • Custom User Avatar

    "Square it and you'll get the nearest square number."

    Square it and you'll get the square of the nearest natural number - not necessarily the nearest square number.
    They are different things and not actually the same.

  • Custom User Avatar

    THIS IS NOT NECESSARILY CORRECT

    For an input 12.4, the answer should be 9, but this gives 16.

    I know the question asks for integers, but there must be some integers for which this holds also.

  • Custom User Avatar

    I noticed that the random tests didn't seem to understand that A2345 is a valid straight. Probably 50-60% of my code is to ensure that worked with both flushed and straight flushes.

    Note that K♠ Q♠ J♠ 10♣ 9♠ - 8♠ 7♠ is both a straight and a flush, but not a straight flush. This gets surprisingly bloody complicated when working with the high-low ace!