Created
May 2, 2019 04:23
-
-
Save whatalnk/b1a872152a94ba57de8915a1f6f01bf4 to your computer and use it in GitHub Desktop.
AtCoder ABC #125 B - Resale
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
n = gets.chomp.to_i | |
v = gets.chomp.split(" ").map(&:to_i) | |
c = gets.chomp.split(" ").map(&:to_i) | |
ans = 0 | |
n.times do |i| | |
xy = v[i] - c[i] | |
ans += xy if xy > 0 | |
end | |
puts ans |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment