Skip to content

Instantly share code, notes, and snippets.

@whatalnk
Created December 28, 2015 00:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whatalnk/9b64b9e38ae707020824 to your computer and use it in GitHub Desktop.
Save whatalnk/9b64b9e38ae707020824 to your computer and use it in GitHub Desktop.
yukicoder No.035
# [No.35 タイパー高橋 - yukicoder](http://yukicoder.me/problems/4)
n = gets.chomp.to_i
success_, fail_ = [0, 0]
n.times do
t, s = gets.chomp.split(" ")
t = t.to_f
l = (12 * t / 1000).floor
if s.length <= l then
success_ += s.length
else
success_ += l
fail_ += s.length - l
end
end
puts [success_, fail_].join(" ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment