Skip to content

Instantly share code, notes, and snippets.

@cxasper
Created October 15, 2017 16:12
Show Gist options
  • Save cxasper/5020d07093e7a2a6a344a2237519c4d7 to your computer and use it in GitHub Desktop.
Save cxasper/5020d07093e7a2a6a344a2237519c4d7 to your computer and use it in GitHub Desktop.
n = gets.chomp
n = n.to_i
if (n%2==0)
case n
when 2 ... 6
puts "Not Weird"
when 6 ... 21
puts "Weird"
when 22 ... 101
puts "Not Weird"
end
else
puts "Weird"
end
n = gets.chomp
if (n.to_i%2==0)
case n
when 2 ... 6
puts "Not Weird"
when 6 ... 21
puts "Weird"
when 22 ... 101
puts "Not Weird"
end
else
puts "Weird"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment