Created
July 8, 2014 15:24
-
-
Save marclave/6c37c81c4f3eb3a10a46 to your computer and use it in GitHub Desktop.
Code Golf Leibniz formula for π
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for _ in[1]*input():print sum((-1.0)**x/(2*x+1)for x in range(input())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Scored 22.9/24.70
#0
0.04s : Success
#1
2.69s : Success