爱意随风起9306 发表于 2022-12-28 16:35:44

帮看看代码,哪里出了问题,通过不了

https://thumbnail1.baidupcs.com/thumbnail/736a4347ftd2052cb78f266d93f82332?fid=1590253992-250528-297475739904915&rt=pr&sign=FDTAER-DCb740ccc5511e5e8fedcff06b081203-ahLM5J92mmmZ1mVVlNgQCgEI8wc%3d&expires=8h&chkbd=0&chkv=0&dp-logid=318165805943736254&dp-callid=0&time=1672214400&size=c1463_u915&quality=90&vuk=1590253992&ft=image&autopolicy=1



x=int(input())
if x<1:
    y=x
    print('%.2f' % y)
elif 1<=x<10:
    y=2*x-1
    print('%.2f' % y)
elif x>=10:
    y=3 *x-11
    print('%.2f' % y)

lvk 发表于 2022-12-28 16:39:57

int改为float
页: [1]
查看完整版本: 帮看看代码,哪里出了问题,通过不了