Created
June 7, 2019 07:01
-
-
Save sbsatter/ca3240ae404ee7f7adc30898cc8cdd7f to your computer and use it in GitHub Desktop.
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
# Enter your code here. Read input from STDIN. Print output to STDOUT | |
n = int(input()) | |
arr = list(map(int, input().split())) | |
w = list(map(int, input().split())) | |
s = 0 | |
for i in range(n): | |
s = s + arr[i] * w[i] | |
s /= sum(w) | |
print(round(s, 1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment