n=input() s=0 for i in n: s+=int(i) if int(n)%s==0: print (int(n)//s) else: print("0") Python 3
thanks for sharing answer
@placementprep833