STUDYING/Algorithm
[Programmers] 수박수박수박수박수박수?
EOZIN
2021. 9. 27. 00:43
728x90
https://programmers.co.kr/learn/courses/30/lessons/12922
func solution(_ n:Int) -> String {
var res = ""
for i in 0..<n {
if i%2 == 0 {
res += "수"
} else {
res += "박"
}
}
return res
}