n = gets.to_i f = Array.new for i in 1..n for j in 1..i/2 f[i] += f[j] end f[i]++ end print f[n]
刚学语法,不知道错在哪
ruby没有自加,我智障了