a = $<.map(&:chomp) if a.size == 1 if a[0].to_i == 0 puts "Hello World!" else n = a[0].to_i if n % 2 == 0 p n * (n + 1) / 2 else 1.upto(n) do |x| if x % 15 == 0 puts "FizzBuzz" elsif x % 5 == 0 puts "Buzz" elsif x % 3 == 0 puts "Fizz" else p x end end end end elsif a.size == 2 b = a[0].split if b.size == 1 n = b[0].to_i p a[1].split.map(&:to_i).inject(:+) else x, y = b.map(&:to_i) puts "#{x + y} #{a[1]}" end else n = a[0].to_i ans = 0 1.upto(n) do |i| ans += a[i].to_i end p ans end