[Project Euler] Fix code style for multiple problems (#3094)

* Fix code style for Project Euler problems:

- 13, 17, 21
- Default args
- Type hints
- File path

* Fix code style for multiple problems

* Made suggested changes
This commit is contained in:
Dhruv
2020-10-10 21:23:17 +05:30
committed by GitHub
parent c961d5541f
commit 501a2ff430
11 changed files with 89 additions and 67 deletions

View File

@@ -1,6 +1,6 @@
"""
Number letter counts
Problem 17
Problem 17: https://projecteuler.net/problem=17
If the numbers 1 to 5 are written out in words: one, two, three, four, five,
then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total.
@@ -16,7 +16,7 @@ usage.
"""
def solution(n):
def solution(n: int = 1000) -> int:
"""Returns the number of letters used to write all numbers from 1 to n.
where n is lower or equals to 1000.
>>> solution(1000)