Skip to content

Commit dbeecb0

Browse files
[Project Euler] Fix code style for problem 56 (TheAlgorithms#3050)
* rename method for project_euler/problem TheAlgorithms#56 * Update sol1.py * Removed whitespaces Co-authored-by: Dhruv <[email protected]>
1 parent d493b81 commit dbeecb0

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

Diff for: project_euler/problem_56/sol1.py

+16-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
1-
def maximum_digital_sum(a: int, b: int) -> int:
1+
"""
2+
Project Euler Problem 56: https://projecteuler.net/problem=56
3+
4+
A googol (10^100) is a massive number: one followed by one-hundred zeros;
5+
100^100 is almost unimaginably large: one followed by two-hundred zeros.
6+
Despite their size, the sum of the digits in each number is only 1.
7+
8+
Considering natural numbers of the form, ab, where a, b < 100,
9+
what is the maximum digital sum?
10+
"""
11+
12+
13+
def solution(a: int = 100, b: int = 100) -> int:
214
"""
315
Considering natural numbers of the form, a**b, where a, b < 100,
416
what is the maximum digital sum?
517
:param a:
618
:param b:
719
:return:
8-
>>> maximum_digital_sum(10,10)
20+
>>> solution(10,10)
921
45
1022
11-
>>> maximum_digital_sum(100,100)
23+
>>> solution(100,100)
1224
972
1325
14-
>>> maximum_digital_sum(100,200)
26+
>>> solution(100,200)
1527
1872
1628
"""
1729

0 commit comments

Comments
 (0)