repl.it
@anonymous/

CircularWellmadeAfricanhornbill

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
x=lambda d,i:sum(eval("*".join(map(str,[z,*d])))for z in i if d.pop(0))
assert x([6, 6, 6, 6, 6, 6, 6, 6, 6, 6],[3, 1, 5, 5, 3, 0, 5, 2, 5, 4]) == 33570178
assert x([5, 1, 10],[3, 0, 7]) == 37
assert x([10, 10, 4, 62, 7],[1, 2, 3, 4, 5]) == 22167
assert x([5, 10],[4, 2]) == 42