Created
June 2, 2016 00:05
-
-
Save joffilyfe/b425a9b24c44e22389cefc6c1377bafe to your computer and use it in GitHub Desktop.
URI problem solved with Ruby lang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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