You are viewing a single comment's thread. Return to all comments →
def fact(n): if n==0 or n==1: return 1 else: return n*fact(n-1) sum=0 for i in range(10, int(input())+1): sum1=0 for j in str(i): sum1+=fact(int(j)) if(sum1%i==0): sum+=i print(sum)
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #34: Digit factorials
You are viewing a single comment's thread. Return to all comments →