psf/black code formatting (#1277)

This commit is contained in:
William Zhang
2019-10-05 01:14:13 -04:00
committed by Christian Clauss
parent 07f04a2e55
commit 9eac17a408
291 changed files with 6014 additions and 4571 deletions

View File

@ -1,5 +1,3 @@
def maximum_digital_sum(a: int, b: int) -> int:
"""
Considering natural numbers of the form, a**b, where a, b < 100,
@ -18,9 +16,17 @@ def maximum_digital_sum(a: int, b: int) -> int:
"""
# RETURN the MAXIMUM from the list of SUMs of the list of INT converted from STR of BASE raised to the POWER
return max([sum([int(x) for x in str(base**power)]) for base in range(a) for power in range(b)])
return max(
[
sum([int(x) for x in str(base ** power)])
for base in range(a)
for power in range(b)
]
)
#Tests
# Tests
if __name__ == "__main__":
import doctest
doctest.testmod()