Skip to content

Instantly share code, notes, and snippets.

@nommy
Created May 23, 2012 04:45
Show Gist options
  • Save nommy/2773315 to your computer and use it in GitHub Desktop.
Save nommy/2773315 to your computer and use it in GitHub Desktop.
AOJ Problem Volume100-10002 - Rectangle
x = gets.chomp
s = x.split(nil)
a = x.split[0].to_i
b = x.split[1].to_i
area = a * b
compass = a**2 + b**2
puts area.to_s + " " + compass.to_s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment