Skip to content

Instantly share code, notes, and snippets.

@erukiti
Created May 27, 2012 12:32
Show Gist options
  • Save erukiti/2814043 to your computer and use it in GitHub Desktop.
Save erukiti/2814043 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# coding: utf-8
sum = 0
num = 0
STDIN.gets #discard
STDIN.gets.strip.each_byte do |ch|
sum += 69 - ch if ch < 69
num += 1
end
score = sum.to_f / num.to_f
#p score
#p sum.to_f
#p num.to_f
puts score
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment