Skip to content

Instantly share code, notes, and snippets.

@mura303
Created April 7, 2012 17:31
Show Gist options
  • Save mura303/2330671 to your computer and use it in GitHub Desktop.
Save mura303/2330671 to your computer and use it in GitHub Desktop.
k = gets.split[1].to_i
scores = gets.split.map{|e| e.to_i }
t = scores[k]
t = 1 if t == 0
puts scores.count{|e| e >= t}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment