Code Festival C Div and Add by siman

#!ruby -n
p (t=[[$_.to_i,1]]).map{|v,s|2.upto(v){|i|v%i<1&&t<<[v/i,v>99?2:s+v/10+v%10]};s}.max

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

download

return to the top page