Compare commits
5 commits
0f2b0e5c34
...
72d0bbea61
| Author | SHA1 | Date | |
|---|---|---|---|
| 72d0bbea61 | |||
| 8e109e3f0f | |||
| 7457fa4451 | |||
| 02006e9efe | |||
| d683bb8c65 |
1 changed files with 1 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ def solve(input: str) -> int:
|
||||||
if digits % repeat != 0:
|
if digits % repeat != 0:
|
||||||
continue
|
continue
|
||||||
cycle = digits // repeat
|
cycle = digits // repeat
|
||||||
base = (10**digits - 1) / (10**cycle - 1)
|
base = (10**digits - 1) // (10**cycle - 1)
|
||||||
if n % base == 0:
|
if n % base == 0:
|
||||||
yield n
|
yield n
|
||||||
break # Don't yield the same digit twice
|
break # Don't yield the same digit twice
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue