def l1():
l1_gold=0.75
l1_diamond=8
l1_value=l1_gold+l1_diamond*0.05
print(‘l1 is :’,l1_value)
print(’~~~~~~~~~~~~~~~~~’)
return l1_value
l1_final_value=l1()
def l3():
l3_gold=0.39
l3_vit=10
l3_value=l3_gold+l3_vit+13*l1_final_value
print(‘l3 is :’,l3_value)
return l3_value
l3_final_value=l3()
def l4():
l4_gold=0.897
l4_vit=10
mean=(l4_gold+l4_vit+l3_final_value+16l1_final_value)0.4878+0.5122(0.897+16l1_final_value)
l4_value=(1/0.4878)*mean
print(‘l4 is :’,l4_value)
return l4_value
l4_final_value=l4()
def l5():
l5_gold=19.75
l5_vit=10
l5_value=l5_gold+l5_vit+13l4_final_value
print(‘l5 is :’,l5_value)
return l5_value
l5_final_value=l5()
if l5_final_value>750:
print(‘直接购买6级石划算’)
else:
print(‘自己升级更划算’)
老师,我用手算的方式,求得1级石头1.15,3级石25.34,3级转4级时候,我假设失败n次才成功一次,那失败率就是n/(n+1)=1-0.4878,求得n=1.05,也就是说要失败1.05次才会成功一次,那我假设一定成功时,4级石求得54.637,一定失败时,4级石19.297
所以结合失败和成功的概率,就是19.297n(1.05)+54.637=74.89
我最后的答案是1003,不知道为什么是913