This file contains hidden or 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
| from functools import reduce as red; from math import \ | |
| (factorial as fact, comb);import sys;from decimal import \ | |
| (getcontext as c,Decimal as dc);(a:=range, | |
| b:=int(sys. argv[1]));c\ | |
| ().prec=b; ber=lambda\ | |
| e,f=[dc(1)]: [f.append( | |
| 1-sum(comb(h ,g)*f[g]/(h | |
| - g + 1) for g in a(h)))for | |
| h in a(1, e + 1)] and abs( | |
| f[-1]);print ((2 * fact(b) / |