結果

問題 No.162 8020運動
ユーザー nebukuro09nebukuro09
提出日時 2016-11-29 11:01:57
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 628 bytes
コンパイル時間 1,360 ms
コンパイル使用メモリ 6,676 KB
実行使用メモリ 6,188 KB
最終ジャッジ日時 2023-08-18 09:01:04
合計ジャッジ時間 2,733 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,112 KB
testcase_01 AC 12 ms
5,980 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 12 ms
6,056 KB
testcase_08 WA -
testcase_09 AC 11 ms
6,136 KB
testcase_10 AC 11 ms
5,996 KB
testcase_11 AC 12 ms
6,096 KB
testcase_12 AC 12 ms
6,056 KB
testcase_13 AC 12 ms
5,980 KB
testcase_14 AC 12 ms
6,056 KB
testcase_15 AC 11 ms
5,984 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 11 ms
5,992 KB
testcase_19 WA -
testcase_20 AC 12 ms
6,100 KB
testcase_21 AC 11 ms
5,992 KB
testcase_22 AC 11 ms
6,112 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 11 ms
6,108 KB
testcase_27 WA -
testcase_28 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

A = input()
P = map(lambda x:float((100-int(x))/100.0), raw_input().split())
T = [[0 for _ in xrange(16)] for _ in xrange(A, 81)]
for i in xrange(1, 15):
    T[0][i] = 1.0

for i in xrange(1, 81-A):
    for j in xrange(1,15):
        T[i][j] = ((1-T[i-1][j-1]) * (1-T[i-1][j+1]) * P[0] + \
                  (1-T[i-1][j-1]) * T[i-1][j+1] * P[1] + \
                  T[i-1][j-1] * (1-T[i-1][j+1]) * P[1] + \
                  T[i-1][j-1] * T[i-1][j+1] * P[2]) * \
                  T[i-1][j]
    #for i in xrange(81-A):
    #    print map(lambda x:'%.4f'%x, T[i])
    #print
#print map(float, T[-1])
print '%.6f'%(sum(T[-1])*2)
0