Compound interest by takemoto(kaigi)

a,b,c=STDIN.gets.split(':').map{|w|w.to_i};a.times{|i|puts i==0?b:b+=b*c/100}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page