관리 메뉴

솜씨좋은장씨

[BaekJoon] 6840번 : Who is in the middle? (Python) 본문

Programming/코딩 1일 1문제

[BaekJoon] 6840번 : Who is in the middle? (Python)

솜씨좋은장씨 2022. 12. 16. 12:16
728x90
반응형

코딩 1일 1문제! 오늘의 문제는 백준의 Who is in the middle? 입니다.

 

6840번: Who is in the middle?

In the story Goldilocks and the Three Bears, each bear had a bowl of porridge to eat while sitting at his/her favourite chair. What the story didn’t tell us is that Goldilocks moved the bowls around on the table, so the bowls were not at the right seats

www.acmicpc.net

👨🏻‍💻 코드 ( Solution )

def who_is_in_the_middle(bear_bowl_list):
    return sorted(bear_bowl_list)[1]


if __name__ == "__main__":
    bear_bowl_list = []
    
    for _ in range(3):
        bowl = int(input())
        
        bear_bowl_list.append(bowl)
        
    print(who_is_in_the_middle(bear_bowl_list=bear_bowl_list))

 

 

GitHub - SOMJANG/CODINGTEST_PRACTICE: 1일 1문제 since 2020.02.07

1일 1문제 since 2020.02.07. Contribute to SOMJANG/CODINGTEST_PRACTICE development by creating an account on GitHub.

github.com

Comments