Toggle navigation
YouTube
Facebook
Telegram
english
english
українська
Algotester 4.3
Build 496
2024-10-17
Log In
Contact Us
College
Sponsors
Donate
Sources
Python 3
n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) s = 0 ans = 10**18 for i in range(n): ans = min(ans, s + b[i]) s += a[i] print(min(ans, s))