class Yukicoder def initialize n = gets.to_i answer = 0 n.times do a = gets.to_i answer += Rational(a, 100).numerator end puts answer end end Yukicoder.new