usualoma
3/16/2013 - 10:40 AM

num.rb

puts ('%d千%d百%d十%d'%('%04d'%$*).split('')).gsub(/1(.)|0.?|(\d)/){$1or$2&&'.一二三四五六七八九'[$2.to_i]}