Try
[Programmers/Python] 숫자게임 본문
출처
https://programmers.co.kr/learn/courses/30/lessons/12987?language=python3
소스
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | def solution(A, B): answer = 0 A.sort() B.sort() length = len(A) res1 = 0 k = 0 for i in range (0, length): for j in range(k, length): if (A[i] < B[j]): res1 = res1 + 1 k = j + 1 break answer = res1 return answer | cs |
'Algorithm > Programmers' 카테고리의 다른 글
[Programmers/Python] 스킬트리 (0) | 2019.03.27 |
---|---|
[Programmers/C++] 스킬트리 (0) | 2019.03.27 |
[Programmers/C++] 숫자 게임 (0) | 2019.03.26 |
[Programmers/Python] 저울 (0) | 2019.03.24 |
[Programmers/C++] 저울 (0) | 2019.03.24 |
Comments