Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/Deceptive-numbers/Python/deceptive-numbers.py
Normal file
10
Task/Deceptive-numbers/Python/deceptive-numbers.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from itertools import count, islice
|
||||
from math import isqrt
|
||||
|
||||
def is_deceptive(n):
|
||||
if n & 1 and n % 3 and n % 5 and pow(10, n - 1, n) == 1:
|
||||
for d in range(7, isqrt(n) + 1, 6):
|
||||
if not (n % d and n % (d + 4)): return True
|
||||
return False
|
||||
|
||||
print(*islice(filter(is_deceptive, count()), 100))
|
||||
Loading…
Add table
Add a link
Reference in a new issue