728x90
특정 문자 제거하기
class Solution {
fun solution(my_string: String, letter: String) = my_string.replace(letter,"")
}
각도기
class Solution {
fun solution(angle: Int) =
if (angle < 90) 1
else if (angle == 90) 2
else if (angle < 180) 3
else 4
}
양꼬치
class Solution {
fun solution(n: Int, k: Int) = n * 12000 + ((k-n/10)*2000)
}
짝수의 합
class Solution {
fun solution(number: Int): Int = (0..number step 2).sum()
}
728x90