Ad
  • Custom User Avatar

    That's the wrong question. The correct question is, it's not specified at all how 1 is handled.

    I've changed the input range to n > 1. Given that 1 should be omitted it doesn't make sense for 1 to be the input anyway.

  • Custom User Avatar

    Yep, 1 is definitely not prime. I was slightly surprised by that being ommited from the spec, but it was not included in the test cases for JavaScript.

  • Custom User Avatar

    Yes, because you can choose who moves first