Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save PiJoules/70ec6ecce718d8a9b0e242a88753f68c to your computer and use it in GitHub Desktop.
Save PiJoules/70ec6ecce718d8a9b0e242a88753f68c to your computer and use it in GitHub Desktop.
https://www.hackerrank.com/contests/code-golf-challenges/challenges/leibniz
0.7266
f=lambda:range(int(input()))
for _ in f():print(sum((-1)**i/(2*i+1) for i in f()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment