Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FEATURE]: Add Harshad numbers #1802

Open
@ridge-kimani

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /