mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
GitHub Action formats our code with psf/black (#1569)
* GitHub Action formats our code with psf/black @poyea Your review please. * fixup! Format Python code with psf/black push
This commit is contained in:
@@ -27,7 +27,7 @@ def solution(n):
|
||||
"""
|
||||
fact = 1
|
||||
result = 0
|
||||
for i in range(1,n + 1):
|
||||
for i in range(1, n + 1):
|
||||
fact *= i
|
||||
|
||||
for j in str(fact):
|
||||
|
||||
@@ -14,15 +14,13 @@ import os
|
||||
from math import log10
|
||||
|
||||
|
||||
def find_largest(data_file: str="base_exp.txt") -> int:
|
||||
def find_largest(data_file: str = "base_exp.txt") -> int:
|
||||
"""
|
||||
>>> find_largest()
|
||||
709
|
||||
"""
|
||||
largest = [0, 0]
|
||||
for i, line in enumerate(
|
||||
open(os.path.join(os.path.dirname(__file__), data_file))
|
||||
):
|
||||
for i, line in enumerate(open(os.path.join(os.path.dirname(__file__), data_file))):
|
||||
a, x = list(map(int, line.split(",")))
|
||||
if x * log10(a) > largest[0]:
|
||||
largest = [x * log10(a), i + 1]
|
||||
|
||||
Reference in New Issue
Block a user