Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jobs = list(map(int, input().split(', ')))
- index = int(input())
- print(sum([i for i in jobs if i <= jobs[index]]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement