def solution(n):
answer = '수박'
if n%2 == 0:
answer *= n // 2
else:
answer *= n
answer = answer[:n]
return answer
'Coding Test > Programmers_Python' 카테고리의 다른 글
[프로그래머스/python] 같은 숫자는 싫어 (0) | 2020.07.06 |
---|---|
[프로그래머스/python] 평균 구하기 (0) | 2020.07.03 |
[프로그래머스/python] 약수의 합 (0) | 2020.07.03 |
[프로그래머스/python] 문자열 내 p와 y의 개수 (0) | 2020.07.03 |
[프로그래머스/python] 서울에서 김서방 찾기 (0) | 2020.07.02 |