Compare commits
5 commits
72d0bbea61
...
0f2b0e5c34
| Author | SHA1 | Date | |
|---|---|---|---|
| 0f2b0e5c34 | |||
| 7e056b9036 | |||
| a4f740f825 | |||
| a1e99ff1e2 | |||
| 9fac61bdd5 |
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