divisor로 나눠져야 하며, bound보다 작거나 같아야 한다. 이 수는?
코틀린
fun maxMultiple(divisor: Int, bound: Int) =divisor * (bound/ divisor)
파이썬
def maxMultiple(divisor, bound): return divisor * (bound//divisor)
728x90
반응형
'Algorithm > Core' 카테고리의 다른 글
#6. Circle of Numbers (0) | 2021.11.08 |
---|---|
#4. Seats in Theater (0) | 2021.11.07 |
#3. Candies (0) | 2021.11.02 |