Advertisement
icarussiano

day 6

Dec 6th, 2023 (edited)
907
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. import re
  2. d = [list(map(int, re.findall(r"(\d+)", l))) for l in open("input").read().splitlines()]
  3. p=1
  4. #d=[[int(''.join(map(str, d[i])))] for i in range(2)] #remove for part 2
  5. for x,y in zip(d[0],d[1]):
  6.     p*=sum(1 for i in range(x) if i*(x-i)>y)
  7. print(p)
  8.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement