We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70a1245 commit 81695e7Copy full SHA for 81695e7
1 file changed
live8/test87/문제2/백유진.py
@@ -0,0 +1,12 @@
1
+def solution(people, limit):
2
+ answer = 0
3
+ sorted_people = sorted(people)
4
+ start = 0
5
+ end = len(people)-1
6
+
7
+ while start <= end:
8
+ if sorted_people[start] + sorted_people[end] <= limit:
9
+ start += 1
10
+ end -= 1
11
+ answer += 1
12
+ return answer
0 commit comments