Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from itertools import count
- from mpmath import pi,floor,ceil,mp
- for r in count(1):
- v = pi*mp.mpf(r)**3 * 4/3
- d = min(v-floor(v), ceil(v)-v)
- if d<0.00001:
- print(r)
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement