15 lines
275 B
Python
15 lines
275 B
Python
from common import parse, split
|
|
|
|
|
|
def solve(l1: list[int], l2: list[int]) -> int:
|
|
return sum(map(lambda x: x * len(list(filter(lambda y: y == x, l2))), l1))
|
|
|
|
|
|
def main():
|
|
l1, l2 = split(parse("input"))
|
|
print(solve(l1, l2))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|