temp = input("请输入带单位的温度:")
if temp[-1] in ['t','T']:
if eval(temp[0:-1])>=0:
C = eval(temp[0:-1])-273.15
print("摄氏温度为{:.2f}C".format(C))
else:
print("不存在该温度")
elif temp[-1] in ['c','C']:
if eval(temp[0:-1])>=-273.15:
T = eval(temp[0:-1])+273.15
print("开氏温度为{:.2f}T".format(T))
else:
print("不存在该温度")
else:
print("输入格式错误")