Create a gist now

Instantly share code, notes, and snippets.

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