def problem_29(lim=100):
    """ a^b 2<=a,b<=100, number of distinct vals for all possible a,b """
    # derp...
    derp = set()
    for a in range(2, lim + 1):
        for b in range(2, lim + 1):
            derp.add(a ** b)
    return len(derp)