fork(3) download
  1. s = gets.strip
  2. e = "#{s}+#{s.size}+(#{s.split(/(?<!-)/).join '+'})"
  3. puts "#{e}=#{eval e}"
Success #stdin #stdout 0.05s 9664KB
stdin
-123
stdout
-123+4+(-1+2+3)=-115