카타 8급 Count Odd Numbers below n

Jmnote (토론 | 기여)님의 2019년 4월 21일 (일) 02:00 판 (→‎R)

1 C

long odd_count(long n) {
  return n/2;
}

2 C++

int odd_count(int n){
  return n/2;
}

3 Kotlin

4 R

odd_count <- function(n) {
  n %/% 2
}