728x90
반응형

 

정답율 67%를 기록한 문제이다.

 

 

 

내가 맞힌 정답::

def solution(score):
    answer = []
    temp = []
    for arr in score:
        temp.append(int((arr[0] + arr[1]) /2))
    print(temp)
    for i in temp:
        b = 0
        for j in temp:
            if j > i:
                b += 1
        answer.append(b+1)
    
    return answer

아쉽게 틀린 정답::

거의 맞았다고 생각했는데, 테스트 케이스에서 두개가 틀렸다.

def solution(score):
    answer = []
    temp = []
    for arr in score:
        temp.append(int((arr[0] + arr[1]) /2))
    print(temp)
    for i in temp:
        b = 0
        for j in temp:
            if j > i:
                b += 1
        answer.append(b+1)
    
    return answer

 

https://school.programmers.co.kr/learn/courses/30/lessons/120882

 

프로그래머스

코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.

programmers.co.kr

 

728x90
반응형

+ Recent posts