fork download
  1. def f(n):
  2. s=0
  3. while n>0:
  4. m=n%10
  5. s+=(m**m)
  6. n/=10
  7. return s
  8. n=2
  9. while f(n)!=n:
  10. n+=1
  11. print n
  12.  
Success #stdin #stdout 0.02s 9016KB
stdin
Standard input is empty
stdout
3435