{"id":16671,"date":"2021-08-12T09:25:13","date_gmt":"2021-08-12T03:55:13","guid":{"rendered":"https:\/\/python-programs.com\/?p=16671"},"modified":"2021-11-22T18:38:33","modified_gmt":"2021-11-22T13:08:33","slug":"python-program-to-find-strong-numbers-in-a-list","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-find-strong-numbers-in-a-list\/","title":{"rendered":"Python Program to Find Strong Numbers in a List"},"content":{"rendered":"

In the previous article, we have discussed Python Program to Generate Strong Numbers in an Interval<\/a>
\nStrong number:<\/strong><\/p>\n

A Strong number is a special number in which the total of all digit factorials equals the number itself.<\/p>\n

Ex: 145 the sum of factorial of digits = 1 ! + 4 ! +5 ! = 1 + 24 +125<\/p>\n

To determine whether a given number is strong or not. We take each digit from the supplied number and calculate its factorial, we will do this for each digit of the number.<\/p>\n

We do the sum of factorials once we have the factorial of all digits. If the total equals the supplied number, the given number is strong; otherwise, it is not.<\/p>\n

Given a list, and the task is to find all the Strong numbers in a given list.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given List = [4, 1, 4, 145]<\/pre>\n

Output:<\/strong><\/p>\n

The Strong Numbers in a given List are :\r\n1 145<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given List =[5, 10, 650, 40585, 2, 145, 900]<\/pre>\n

Output:<\/strong><\/p>\n

The Strong Numbers in a given List are :\r\n40585 2 145<\/pre>\n

Program to Find Strong Numbers in a List<\/h2>\n

Below are the ways to find all the Strong numbers in a given list.<\/p>\n