You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

5 anni fa
12345678910111213141516171819
  1. import sys
  2. from intcode import compute
  3. def check(x, y):
  4. return next(compute(text, iter([x, y])))
  5. text = sys.stdin.read()
  6. tiles = {(x, y) for x in range(50) for y in range(50) if check(x, y)}
  7. print(len(tiles))
  8. x, y = 0, 0
  9. while not check(x + 99, y):
  10. y += 1
  11. while not check(x, y + 99):
  12. x += 1
  13. print(x * 10_000 + y)