以下の内容はhttps://rochefort.hatenablog.com/entry/2014/07/30/073000より取得しました。


PENULTIMATE WORD(CodeEval)

CHALLENGE DESCRIPTION:

Write a program which finds the next-to-last word in a string.

INPUT SAMPLE:

Your program should accept as its first argument a path to a filename. Input example is the following

some line with text
another line

Each line has more than one word.

OUTPUT SAMPLE:

Print the next-to-last word in the following way.

with
another

My Code

#!/usr/bin/env ruby -w

ARGF.each_line do |line|
  puts line.chomp.split[-2]
end



以上の内容はhttps://rochefort.hatenablog.com/entry/2014/07/30/073000より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14