Movatterモバイル変換


[0]ホーム

URL:


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

Update Armstrong-number.md#7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
deb12378 wants to merge1 commit intoProgrammingHero1:master
base:master
Choose a base branch
Loading
fromdeb12378:patch-4
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletionsMedium/Armstrong-number.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ A number is an Armstrong Number or narcissistic number if it is equal to the sum
Think about the number 371. The total number of digits is 3. Now, for each digit, put the power of 3 and then add them. It will be:

```python
33 +73 +13
3^3 +7^3 +1^3
= 27 + 343 + 1
= 371
```
Expand All@@ -20,7 +20,7 @@ Hence, 371 is an Armstrong number.
Similarly, 1634 is another Armstrong number, because the total number of digits is 4. Now, power each digit and sum them. You will get the Armstrong number.

```python
=14 +64 +34 +44
=1^4 +6^4 +3^4 +4^4
= 1 + 1296 + 81 + 256
= 1634
```
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp