Advertisement
tungSfer

cap so ban be

Jan 16th, 2022
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. prime = [1 for i in range(1000001)]
  2. for i in range(2, 1000001):
  3.     for j in range(2 * i, 1000001, i):
  4.         prime[j] += i
  5.  
  6. cnt = 0
  7. for i in range(220, 286):
  8.     x = prime[i]
  9.     if x < 1000001 and prime[x] == i and prime[i] != i:
  10.         cnt += 1
  11.  
  12. print(cnt//2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement