Jan Vorcak

19,261
reputation
14
54
90

Python quiz (found here)

import re
def blackbox(num):
    return not re.match(r"^1?$|^(11+?)\1+$", "1"*num)