|All-time Popular Problems|
|Delete without head pointer|
|Check if a number is power of another number|
|Array to BST|
|Implement Queue using Linked List|
|Lowest Common Ancestor in a BST|
|Reverse a Linked List in groups of given size.|
|Print all nodes that don’t have sibling|
|Equal to product|
Strong Numbers are the numbers whose sum of factorial of digits is equal to the original number. Given a number, the task is to check if it is a Strong Number or not.
Input : n = 145 Output : 1 Sum of digit factorials = 1! + 4! + 5! = 1 + 24 + 120 = 145 Input : n = 5314 Output : 0
The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. Each test case contains an integer N.
For each test case in a new line print 1 if the number is a strong number, else print a 0.