Skip to content

Commit 164a224

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent d6cd575 commit 164a224

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

maths/special_numbers/disarum_number.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Examples of Disarium Numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 89, 135, 175, 518, 598, ...
66
"""
77

8+
89
def is_disarium_number(number: int) -> bool:
910
"""
1011
This function takes an integer number as input.
@@ -43,6 +44,8 @@ def is_disarium_number(number: int) -> bool:
4344
total = sum(int(digit) ** (idx + 1) for idx, digit in enumerate(digits))
4445
return total == number
4546

47+
4648
if __name__ == "__main__":
4749
import doctest
50+
4851
doctest.testmod()

0 commit comments

Comments
 (0)