programmers | Lv1.수박수박수박수박수박수? [Python]

yeonk·2022년 2월 5일
0

algorithm

목록 보기
3/88
post-thumbnail

💡 Python 3






🔗 문제

수박수박수박수박수박수? [Link]






💻 코드

def solution(n):
    word = '수박' 
    if n % 2 == 0:
        answer = word*(n//2)
    else:
        answer = word*(n//2) + '수' 
    return answer

0개의 댓글