推 waterdrop:原來如此 我了解了 感謝你的熱心回答~~祝你high pa!!^^ 10/20 11:37
※ 引述《waterdrop (林)》之銘言:
: ※ 引述《waterdrop (林)》之銘言:
: : 請問各位
: : $1 is increased by $3
: : 指的是從一塊變成三塊
: : 還是一塊加三塊變成四塊呢
: : 又
: : 如果是 be decreased by 20%
: : 指的是變成80% 還是減掉20%
: : 感謝回答^^
: 先謝謝f大的回答
: 但我想請教一下這題jj
: 158. A certain library assesses fines for overdue books as follows.
: On the first day that a book is overdue, the total fine is $0.10,
: for each additional day that the book is overdue,
: the total fine is either increased by $0.30 or doubled,
: which ever results in the lesser amount.
: what is the total fine for a book on the fourth day it is overdue?
: ans:0.7
: 如果是如f大所言
: 那此題就變成
: day1-->day2-->day3-->day4
: increased by 0.3(為+0.3) 0.1 0.4 0.7 1.0
: double 0.1 0.2 0.4 0.8
: 會是採double的罰則 罰金0.8塊比較便宜
: 但若increased by 0.3(為+0.2) 0.1 0.3 0.5 0.7-->同ans
: 可以再為我解惑一下嗎
: 多謝^^
剛去CD爬文
有770牛人降解釋
第一天0.1
第二天0.1+0.3=0.4 或 0.1*2,後面那個小,所以是0.2
第三天0.2+0.3=0.5 或 0.2*2 0.4
第四天0.4+0.3 或 0.4*2 前面小 最終是取0.7啦
所以算法好像是前一天比出大小後
再就數字小的那個做加或乘的動作囉:)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 123.194.203.188