code_practice

Hackerrank 레벨업 하기10 [Grading Students]

  • By Khel Kim, 김현호
  • 18 Jan 2019
  • Tags : coding_practice

Hackerrank 레벨업하기
문제
Grading Students

def gradingStudents(grades):
    section=[]
    for i in range(8, 21):
        section.append(5*i)
    for i in range(len(grades)):
        if grades[i] <= 37:
            pass
        else:
            tmp = list(filter(lambda x: x>0, map(lambda x: x-grades[i], section)))
            if tmp == []:
                pass
            elif tmp[0]<3:
                grades[i] = grades[i] + tmp[0]
            else:
                pass
    return grades

궁금하신게 있다면 메일 주세요.
k2h7913@daum.net
cafehero123@gmail.com