Code generation helper utility for Spoj (http://spoj.com) problems solving in RUBY