Skip to content

Instantly share code, notes, and snippets.

@joffilyfe
Created June 2, 2016 00:05
Show Gist options
  • Save joffilyfe/b425a9b24c44e22389cefc6c1377bafe to your computer and use it in GitHub Desktop.
Save joffilyfe/b425a9b24c44e22389cefc6c1377bafe to your computer and use it in GitHub Desktop.
URI problem solved with Ruby lang
abas, acoes = gets.chop.split
abas = abas.to_i
acoes.to_i.times do
acao = gets.chop
if acao == "fechou"
abas = abas + 1
else
abas = abas - 1
end
end
puts abas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment