Advertisement
Kwwiker

Решил задачу из слака

Jun 21st, 2021
1,134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. def delit(x):
  2.   if x%2!=0:
  3.     return []
  4.   chet=0
  5.   a=[]
  6.   for i in range(1, int(x**0.5)+1):
  7.     if x%i==0:
  8.       a.append(i)
  9.       if i%2==0:
  10.         chet+=1
  11.       if x//i != i:
  12.         a.append(x//i)
  13.         if (x//i)%2==0:
  14.           chet+=1
  15.       else:
  16.         return []
  17.   if chet == 3:
  18.     return sorted(a)
  19.   else:
  20.     return []
  21.  
  22. for x in range(101000000,102000000+1):
  23.   if len(delit(x)) > 0:
  24.     print(x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement