python,4个WA,有没有大佬解答一下为什么
查看原帖
python,4个WA,有没有大佬解答一下为什么
1349583
taikiShuttle楼主2024/4/27 20:34
import math

GPA = 4.0
score = int(input())

if score < 0:
    print("Score should be a non-negative number.")
elif score <= 89 and score >= 60:
    GPA = 4.0 - (0.1 * (90 - score))
    print(GPA)
else:
    score = math.sqrt(score) * 10
    score = math.floor(score)
    if score <= 60:
        print("0.0")
    else:
        GPA = 4.0 - (0.1 * (90 - score))
        print(GPA)

2024/4/27 20:34
加载中...