import math m=input() su=0 for j in m: k=math.factorial(int(j)) su+=k if su==int(m): print("strong number") else: print("not a strong number")
@soniyashashikanth297410 күн бұрын
Nicely explained
@My_Creativity-143.8 ай бұрын
Nice sir good explanation 😊
@kunalrohilla53915 ай бұрын
n = int(input("enter the number : ")) temp = n sum = 0 while n > 0: digit = n%10 fact = 1 # print("Digit: ",digit) for i in range(1,digit+1): fact = fact*i # print("factorial", fact) sum = sum + fact n = n//10 print(sum) if sum == temp: print("number is strong") else: print("number is not strong")
@jaysurya8914 Жыл бұрын
n=int(input("enter number")) x=n sum=0 while n>0: fact=1 ld=n%10 for i in range(1,ld+1): fact=fact*i print(fact,"factorial") sum=sum+fact print(sum,"sum") n=n//10 if x==sum: print(x,"is a strong number") else: print(x,"is not a strong number")