Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- def f(n):
- div = []
- for d in range(2, math.ceil(n ** 0.5) + 1):
- if n % d == 0:
- div.append(d)
- if len(div) == 0:
- return 0
- M = div[0] + div[-1]
- return M
- def get(n):
- div = []
- for d in range(2, math.ceil(n ** 0.5) + 1):
- if n % d == 0:
- div.append(d)
- print(div)
- n = 700000
- k = 0
- """
- 700004 558
- [2, 4, 139, 278, 556]
- """
- while k < 5:
- n += 1
- M = f(n)
- if str(M)[-1] == '8':
- print(n, M)
- #get(n)
- #print()
- k += 1
- #t = 556
- #print(700004 % t)
- """
- 700004 558
- 700005 348
- 700013 758
- 700015 738
- 700019 158
- """
- #get(
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement