-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Open
Description
Motivation
- A Harshad number (also known as a Niven number) is an integer that is divisible by the sum of its digits.
- Harshad numbers are sometimes called “happy numbers” in recreational mathematics, because they have a simple, satisfying property: their digit sum divides them evenly. They are widely studied in number theory and often appear in math puzzles, programming challenges, and teaching exercises.
Examples
18 is a Harshad number because 1 + 8 = 9 and 18 % 9 === 0.
19 is not, because 1 + 9 = 10 and 19 % 10 !== 0
Possible workarounds
No response
Additional information
No response
Metadata
Metadata
Assignees
Labels
No labels