PROBLEM OF THE DAY : 09/12/2023 | Smith Number
source link: https://www.geeksforgeeks.org/videos/problem-of-the-day-09122023-smith-number/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
PROBLEM OF THE DAY : 09/12/2023
Welcome to the daily solving of our PROBLEM OF THE DAY with Siddharth Hazra. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Number System but also build up problem-solving skills.
In this problem, we are given, a number n, the task is to find out whether this number is a Smith number or not. A Smith number is a composite number whose sum of digits is equal to the sum of digits of its prime factors.
Example :
Input:
n = 4
Output:
1
Explanation:
The sum of the digits of 4 is 4, and the sum of the digits of its prime factors is 2 + 2 = 4.
Give the problem a try before going through the video. All the best!!!
Problem Link: https://practice.geeksforgeeks.org/problems/smith-number4132/1
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK