Spotify puzzle problem
问题 I'm trying to solve the "best before" Spotify puzzle described on this page. Basically, with an input of three integers separated by slashes (e.g. 11/3/4) you're supposed to generate an output with the earliest possible date in 2011-03-04 format. If no date is possible, it should return the original string followed by "is illegal". The idea for my solution below was borrowed from a Python solution I found for the same problem at github. When I submit this Python code, it is accepted. Not