#!/bin/ruby def sumOfGroup(k) # Return the sum of the elements of the k'th group. k**3 end k = gets.strip.to_i answer = sumOfGroup(k) puts answer