選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

20 行
362B

  1. import itertools
  2. import sys
  3. from intcode import compute, parse
  4. def check(noun, verb):
  5. ns = parse(text)
  6. ns[1] = noun
  7. ns[2] = verb
  8. list(compute(ns, 2))
  9. return ns[0]
  10. text = sys.stdin.read()
  11. print(check(12, 2))
  12. for noun, verb in itertools.product(range(100), repeat=2):
  13. if check(noun, verb) == 19690720:
  14. print(100 * noun + verb)