import java.util.Scanner; import java.io.*; fun main(args: Array){ val SIZE=9999999 val z=ByteArray(SIZE) val p=Runtime.getRuntime().exec(arrayOf("ruby","-e","print gets.split.map(&:to_i).reduce(:+),\" \",gets;")); p.getOutputStream().write(z,0,System.`in`.read(z,0,SIZE)) p.getOutputStream().close() val sc=Scanner(p.getInputStream()) while(sc.hasNext())System.out.println(sc.nextLine()) }