Created
December 28, 2015 00:50
-
-
Save whatalnk/9b64b9e38ae707020824 to your computer and use it in GitHub Desktop.
yukicoder No.035
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
# [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