16 Sun

๊ฐ€์šด๋ฐ ๊ธ€์ž ๊ฐ€์ ธ์˜ค๊ธฐ

'''
https://programmers.co.kr/learn/courses/30/lessons/12903
๊ฐ€์šด๋ฐ ๊ธ€์ž ๊ฐ€์ ธ์˜ค๊ธฐ
0. ๊ธธ์ด๊ฐ€ ์ง์ˆ˜๋ฉด 2๊ฐœ์˜ char ์ถœ๋ ฅ
'''
def solution(s):
    size = len(s)
    return (s[size//2-1] if size % 2 == 0 else "") + s[size//2]
'''
'''

Last updated

Was this helpful?