BC63 网购

思路:

step1:输入四个数;
step2:如果bc都为11,a乘0.7;如果bc都为12,a乘0.8;
step3:如果d为1,a-50;
step4:如果a<=0,输出0.00;否则输出结果;

代码如下:

a,b,c,d = list(map(float,input().split()))
if b == 11 and c == 11:
    a = a*0.7
elif b == 12 and c == 12:
    a = a*0.8
if d == 1:
    a = a - 50
if a<=0:
    print('0.00')
else:
    a = a + 0.000001
    print('{:.2f}'.format(a))