The numbers in the first array of values are the lower limit of each range. Based on the formula given, the ranges are

0-39 returns E
40-59 returns D
60-79 returns C
80-89 returns B
90+ returns A