fork download
  1. # your code goes here
Success #stdin #stdout 0.01s 7152KB
stdin
p = 0.7

# 方案1
s1_high = 100 * 10 - 300
s1_low = -20 * 10 - 300
emv1 = p * s1_high + (1 - p) * s1_low

# 方案2
s2_high = 40 * 10 - 140
s2_low = 30 * 10 - 140
emv2 = p * s2_high + (1 - p) * s2_low

# 方案3
s3_high = (40 * 3 + 95 * 7) - (140 + 200)
s3_low = 30 * 10 - 140
emv3 = p * s3_high + (1 - p) * s3_low

print(f"方案1期望收益:{emv1}万元")
print(f"方案2期望收益:{emv2}万元")
print(f"方案3期望收益:{emv3}万元")

# 输出结果:
# 方案1期望收益:340.0万元
# 方案2期望收益:230.0万元
# 方案3期望收益:359.5万元
stdout
Standard output is empty