"카타 7급 Deodorant Evaporator"의 두 판 사이의 차이

7번째 줄: 7번째 줄:
{{카타|7급|R|1}}
{{카타|7급|R|1}}
<source lang='r'>
<source lang='r'>
evaporator <- function(content, evap_per_day, threshold) {
  ceiling(log(threshold / 100.0) / log(1.0 - evap_per_day / 100.0))
}
</source>
<source lang='r'>
evaporator <- function(content, evap_per_day, threshold) {
  ratio <- 100
  day <- 0
  while( ratio > threshold ) {
    ratio <- ratio * (100 - evap_per_day) / 100
    day <- day + 1
  }
  day
}
</source>
</source>

2019년 4월 7일 (일) 12:58 판

1 C

2 R

evaporator <- function(content, evap_per_day, threshold) {
  ceiling(log(threshold / 100.0) / log(1.0 - evap_per_day / 100.0))
}
evaporator <- function(content, evap_per_day, threshold) {
  ratio <- 100
  day <- 0
  while( ratio > threshold ) {
    ratio <- ratio * (100 - evap_per_day) / 100
    day <- day + 1
  }
  day
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}