Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEAProbably not the most elegant solution but the output is correct.
Having looked through other replies i'm surprised how many people didn't realise or notice that a draw was a possible outcome :)