Adopted new convention from template
This commit is contained in:
parent
314ed47f05
commit
a0a7a8d34d
@ -12,12 +12,13 @@ https://projecteuler.net/problem=35
|
||||
from utils import is_prime, timeit
|
||||
|
||||
|
||||
def circular_number(n):
|
||||
n = str(n)
|
||||
result = []
|
||||
for i in range(len(n)):
|
||||
result.append(int(n[i:] + n[:i]))
|
||||
return result
|
||||
def circular_number(number):
|
||||
num_str = str(number)
|
||||
ans = []
|
||||
for i in range(len(num_str)):
|
||||
ans.append(int(num_str[i:] + num_str[:i]))
|
||||
|
||||
return ans
|
||||
|
||||
|
||||
@timeit("Problem 35")
|
||||
@ -47,5 +48,4 @@ def compute():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
print(f"Result for Problem 35: {compute()}")
|
||||
print(f"Result for Problem 35 is {compute()}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user