Advertisement
philRG

Snakes vs others

Apr 21st, 2021
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.10 KB | None | 0 0
  1. n=gets.to_i
  2. c=0
  3. while gets
  4. c+=1 if ["-<",">-"].any?{|s|$_.include?s}
  5. end
  6. puts (100*c/n).to_s+"%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement