# prac0103.rb
# ϤÈÀÑ

def sum(n)
  sum = 0
  for k in 1..n
    sum += k
  end
  return sum
end

def pai(n)
  pai = 1
  for k in 2..n
    pai *= k
  end
  return pai
end

a = sum(5)
b = sum(6)
c = pai(5)

puts a
puts b
puts c