Skip to content

Commit

Permalink
Add PG_marathon
Browse files Browse the repository at this point in the history
  • Loading branch information
MukKim committed May 8, 2019
1 parent f684a5e commit 9eae3ea
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions 김현묵/6주차/PG_marathon/Solution.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 첫번재 풀이입니다. 효율성 : 0

# def solution(participant, completion):
# for completionHuman in completion:
# for participantHuman in participant:
# if completionHuman == participantHuman:
# participant.remove(participantHuman)
# break
#
# answer = participant[0]
# return answer


# 두번재 풀이입니다. 효율성 : 0

def solution(participant, completion):
for completionHuman in completion:
if completionHuman in participant:
participant.remove(completionHuman)


answer = participant[0]
return answer






# 파이썬 파일 실행 후 첫번재 줄에 마라톤 선수들의 이름을 입력합니다.
# 각 선수들 사이는 공백으로 구분합니다.
# 두번째 줄에는 완주한 선수들의 이름을 입력합니다.
# 각 선수들 사이는 공백으로 구분합니다.

athlete = input().strip().split()
success = input().strip().split()

athleteList = []
finishList = []

for human in athlete:
athleteList.append(human)

for successHuman in success:
finishList.append(successHuman)

failHuman = solution(athleteList, finishList)
print(failHuman)

0 comments on commit 9eae3ea

Please sign in to comment.