**
蓝桥杯 (Python) ADV-120 6-17复数四则运算
**
## 这里始终有一个答案错误,望各位路过的大佬指正
def complexlize(fushu,fuhao):
if fushu.imag == 0 and fushu.real == 0:
print(0)
elif fushu.imag == 0:
print(round(fushu.real,1))
elif fushu.real == 0:
print(str(round(fushu.imag,1))+'i')
else:
# shi = round(fushu.real,1)
# xu = round(fushu.imag,1)
# print(str(shi)+'+'+str(xu)+'i')
s = str(fushu)[1:-2]
s = s + 'i'
for i in s:
print(i,end='')
seq = list(map(str,input().split()))
a_shi = int(seq[0])
a_xu = int(seq[1])
b_shi = int(seq[3])
b_xu = int(seq[4])
a =complex(a_shi,a_xu)
b =complex(b_shi,b_xu)
fuhao = seq[2]
if fuhao == '+':
complexlize(a+b,fuhao)
if fuhao =='-':
complexlize(a-b,fuhao)
if fuhao == '*':
complexlize(a*b,fuhao)
if fuhao == '/':
try:
complexlize(a/b,fuhao)
except:
print('error')