mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
d5b0f8e596
commit
ac8eb44fc7
@ -37,7 +37,7 @@ def pluperfect_number(n: int) -> bool:
|
||||
for digit in num_str:
|
||||
digit_histogram[int(digit)] += 1
|
||||
|
||||
total = sum(cnt * (i ** num_digits) for i, cnt in enumerate(digit_histogram))
|
||||
total = sum(cnt * (i**num_digits) for i, cnt in enumerate(digit_histogram))
|
||||
return n == total
|
||||
|
||||
|
||||
@ -65,4 +65,3 @@ if __name__ == "__main__":
|
||||
|
||||
doctest.testmod()
|
||||
main()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user