救命!Python一直RE
  • 板块P1765 手机
  • 楼主yang7429151
  • 当前回复7
  • 已保存回复7
  • 发布时间2020/5/5 20:13
  • 上次更新2023/11/7 03:04:48
查看原帖
救命!Python一直RE
322710
yang7429151楼主2020/5/5 20:13

救命!Python一直RE,大神们,我是学生党能帮帮我吗 (家境贫寒)

char = list(input());sum = 0;number =[1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,4,1,2,3,1,2,3,4]
for temp in range (0,len(char)):
    if char[temp] == ' ':
        sum += 1
    else:
        sum += number[ord(char[temp])-ord("a")]
print (sum)
2020/5/5 20:13
加载中...