Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. from itertools import count
  2. from mpmath import pi,floor,ceil,mp
  3.  
  4. for r in count(1):
  5. v = pi*mp.mpf(r)**3 * 4/3
  6. d = min(v-floor(v), ceil(v)-v)
  7. if d<0.00001:
  8. print(r)
  9. break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement