"카타 8급 Count Odd Numbers below n"의 두 판 사이의 차이

18번째 줄: 18번째 줄:
{{카타|8급|R|2}}
{{카타|8급|R|2}}
<source lang='r'>
<source lang='r'>
odd_count <- function(n) {
  n %/% 2
}
</source>
</source>

2019년 4월 5일 (금) 02:29 판

1 C

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

2 C++

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

3 R

odd_count <- function(n) {
  n %/% 2
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}