Леухин Илья Олегович, 313 (Севастополь) NonPrime 9436 | Кирилл Суглобов, 617 группа NonPrime 10209 | ||||
---|---|---|---|---|---|
f | 1 | from itertools import count | f | 1 | from itertools import count |
2 | 2 | ||||
3 | def nonprime(n=0): | 3 | def nonprime(n=0): | ||
t | 4 | for x in count(n + 1): | t | 4 | for num in count(n + 1): |
5 | if x == 1 or any((x % i == 0 for i in range(2, int(x ** 0.5) + 1 | 5 | if num == 1 or any((num % i == 0 for i in range(2, int(num ** 0. | ||
> | ))): | > | 5) + 1))): | ||
6 | yield x | 6 | yield num |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|