>>> for a in range(1,10):... for b in range(0,10):... for c in range(0,10):... x=100*a+10*b+c... y=a*a*a+b*b*b+c*c*c... if x==y:... print x