Advertisement
TomGC96

Euler

Dec 9th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. phi = 1
  2.     chosen_range_phi = 0
  3.     if p > q:
  4.         chosen_range_phi = q
  5.     else:
  6.         chosen_range_phi = p
  7.     for k in range(chosen_range_phi, n + 1):
  8.         if math.gcd(n, k) == 1:
  9.             phi += 1
  10.             print(phi)
  11.     return phi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement