refactor: Move constants outside of variable scope (#7262)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com> Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
@@ -13,6 +13,8 @@ Find the sum of all the numbers less than 10^8 that are both palindromic and can
|
||||
be written as the sum of consecutive squares.
|
||||
"""
|
||||
|
||||
LIMIT = 10**8
|
||||
|
||||
|
||||
def is_palindrome(n: int) -> bool:
|
||||
"""
|
||||
@@ -35,7 +37,6 @@ def solution() -> int:
|
||||
Returns the sum of all numbers less than 1e8 that are both palindromic and
|
||||
can be written as the sum of consecutive squares.
|
||||
"""
|
||||
LIMIT = 10**8 # noqa: N806
|
||||
answer = set()
|
||||
first_square = 1
|
||||
sum_squares = 5
|
||||
|
||||
Reference in New Issue
Block a user