Ad
  • Custom User Avatar

    The input is "1234\n". I can;t remember exactly how it works in Java, but in some implementations, $ can successfully match a final newline, resulting in wrong answers for this challenge.