More than 5 years have passed since last update.
puts gets.split.map(&:to_i).sum.to_s.slice(-1)
Register as a new user and use Qiita more conveniently