Advertisement
boris-vlasenko

ege25

Sep 14th, 2020
1,020
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. A = 174457
  2. B = 174505
  3. # ~ A = 5
  4. # ~ B = 9
  5. def count_of_del(x):
  6.     res = []
  7.     for i in range(2,int(x**0.5)+1):
  8.         if x % i == 0:
  9.             res.append(i)
  10.             res.append(x//i)
  11.     return sorted(set(res))
  12.  
  13. res = {}
  14. for x in range(A,B+1):
  15.     d = count_of_del(x)
  16.     if len(d) == 2:
  17.         res[d[0]*d[1]] = d
  18.  
  19. for item in sorted(res):
  20.     print(*res[item])
  21.        
  22.        
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement