Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
6
Task/Gapful-numbers/Python/gapful-numbers.py
Normal file
6
Task/Gapful-numbers/Python/gapful-numbers.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
from itertools import islice, count
|
||||
for start, n in [(100, 30), (1_000_000, 15), (1_000_000_000, 10)]:
|
||||
print(f"\nFirst {n} gapful numbers from {start:_}")
|
||||
print(list(islice(( x for x in count(start)
|
||||
if (x % (int(str(x)[0]) * 10 + (x % 10)) == 0) )
|
||||
, n)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue