LOTT - Xổ số

Tác giả: khuc_tuan

Ngôn ngữ: Python

F=[	0.0,1.0,1.0,0.5004995004995005,0.2905056759545923,0.18831168831168832,0.13161551092585574,0.09705451095394169,0.07447933763723238,0.05893879234775434,0.04779210481602447,0.039528728762913,0.03323475257401247,0.02833125582332351,0.024437218696103304,0.021293626252144485,0.018719455095204597,0.016585117084676297,0.014795877828954968,0.013281189283099105,0.011987644167320162,0.010874212668378378,0.009908954314662415,0.00906670527071086,0.008327423942647239,0.007674989188542126,0.00709631499550928,0.006580689867749948,0.006119278042572384,0.005704738773363287,0.005330932792549047,0.004992693867686179,0.004685649464225555,0.0044060788129125054,0.004150799725544582,0.003917077692678838,0.0037025523881445976,0.003505177873047828,0.0033231736570587555,0.003154984421280131,0.002999246694153425,0.002854761141830804,0.002720469417499033,0.0025954347322278593,0.0024788254790646677,0.0023699013741218964,0.0022680016820733223,0.0021725351753470743,0.0020829715413143773,0.0019988340036656686,0.001919692965793805,0.0018451605175575437,0.0017748856739672053,0.0017085502364297964,0.0016458651852358157,0.0015865675267664305,0.0015304175310796165,0.001477196305597236,0.0014267036589595457,0.0013787562160567954,0.001333185751043936,0.0012898377099990138,0.001248569898964183,0.001209251316544779,0.0011717611131459912,0.0011359876613876159,0.001101827724328539,0.0010691857099140811,0.0010379730015809385,0.0010081073562572293,9.79512362113221E-4,9.521169493801174E-4,9.258549483834684E-4,9.006646896542007E-4,8.764886416005805E-4,8.532730817626102E-4,8.309677981382295E-4,8.095258174782203E-4,7.889031578023435E-4,7.690586027001621E-4,7.499534952523081E-4,7.315515496468653E-4,7.138186787755071E-4,6.967228362788472E-4,6.802338716734345E-4,6.643233973367226E-4,6.489646662536305E-4,6.341324595410415E-4,6.198029828665949E-4,6.059537709669546E-4,5.925635995497607E-4,5.796124039338542E-4,5.670812038451472E-4,5.549520338415767E-4,5.43207878890715E-4,5.318326146684996E-4,5.208109521877798E-4,5.10128386401491E-4,4.997711484577105E-4,4.897261613130418E-4,4.7998099843704644E-4]
while True:
    s = raw_input().split(chr(13))[0]
    if s == "[END]":
        break
    n = int(raw_input().split(chr(13))[0])
    raw_input()
    print "%.7f" % (F[n])

Download