Created
April 7, 2012 17:31
-
-
Save mura303/2330671 to your computer and use it in GitHub Desktop.
This file contains 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
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