We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43c2d3f commit d986cd8Copy full SHA for d986cd8
kojungbeom/Programmers/Level3/숫자 게임.py
@@ -0,0 +1,18 @@
1
+def solution(A, B):
2
+ answer = 0
3
+ A.sort(); B.sort()
4
+ lenA, lenB = len(A), len(B)
5
+ Ap, Bp = 0, 0
6
+
7
+ while Bp < lenB and Ap < lenA:
8
+ if A[Ap] < B[Bp]:
9
+ answer += 1
10
+ Ap += 1
11
+ Bp += 1
12
+ elif A[Ap] == B[Bp]:
13
+ #Ap += 1
14
15
+ elif A[Ap] > B[Bp]:
16
17
+ print(answer)
18
+ return answer
0 commit comments