mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-19 19:03:02 +08:00
psf/black code formatting (#1277)
This commit is contained in:

committed by
Christian Clauss

parent
07f04a2e55
commit
9eac17a408
@ -6,6 +6,8 @@ the product of two 2-digit numbers is 9009 = 91 x 99.
|
||||
Find the largest palindrome made from the product of two 3-digit numbers which
|
||||
is less than N.
|
||||
"""
|
||||
|
||||
|
||||
def solution(n):
|
||||
"""Returns the largest palindrome made from the product of two 3-digit
|
||||
numbers which is less than n.
|
||||
@ -31,9 +33,7 @@ def solution(n):
|
||||
# if 'number' is a product of two 3-digit numbers
|
||||
# then number is the answer otherwise fetch next number.
|
||||
while divisor != 99:
|
||||
if (number % divisor == 0) and (
|
||||
len(str(int(number / divisor))) == 3
|
||||
):
|
||||
if (number % divisor == 0) and (len(str(int(number / divisor))) == 3):
|
||||
return number
|
||||
divisor -= 1
|
||||
|
||||
|
Reference in New Issue
Block a user