答案在914左右的,在合成三级石时,考虑的原材料是12颗一级石,合成四级石时,原材料是一颗三级宝石和16颗一级石,合成六级石时,原材料是12颗四级石;
答案在1003左右的,合成每一级的石头,考虑的原材料都有上一级的石头
from value import *
#一颗一级宝石需要花费多少金
def stone_one():
gold = l1_value_diamond * 0.05 + l1_value
return gold
#升级一颗三级宝石需要花费多少金
gold_one = stone_one()
def stone_three():
#gold = l1_to_l3_gold + l1_to_l3_vit * 1 + (l1_to_l3+1) * gold_one
gold = l1_to_l3_gold + l1_to_l3_vit * 1 + l1_to_l3 * gold_one
return gold
#升级一颗四级宝石需要花费多少金
gold_three = stone_three()
def stone_four():
# gold = gold_three + l3_to_l4_vit * 1 + (l3_to_l4 * gold_one + l3_to_l4_gold)/l3_to_l4_rate
gold = gold_three + l3_to_l4_vit * 1 + (l3_to_l4 * gold_one + l3_to_l4_gold)/l3_to_l4_rate
return gold
#得到一颗六级宝石需要花费多少金
gold_four = stone_four()
def stone_six():
# gold = gold_four + l4_to_16_gold + l4_to_16_vit * 1 + l4_to_16 * gold_four
gold = l4_to_16_gold + l4_to_16_vit * 1 + l4_to_16 * gold_four
return gold
gold_six = stone_six()
print('合成大概需要金币数为:'+ str(gold_six))
#判断是否划算
if gold_six < 750:
print('自己合成划算')
elif gold_six == 750:
print('都可以')
else:
print('购买划算')