카타 8급 Holiday VIII - Duty Free

1 C++[ | ]

int duty_free(int price, int discount, int holiday_cost) {
  return holiday_cost*100/price/discount;
}
int duty_free(int price, int discount, int holiday_cost) {
  return holiday_cost * 100 /(price * discount);
}

2 Kotlin[ | ]

fun dutyFree(normPrice: Int, discount:Int, hol:Int) : Int {
  return hol*100/normPrice/discount
}
fun dutyFree(normPrice: Int, discount:Int, hol:Int) = hol * 100 / (normPrice * discount)
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}