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

17 行
513B

  1. import toolkit
  2. dots, instructions = text.split('\n\n')
  3. dots = {eval(pair) for pair in dots.splitlines()}
  4. ans1 = None
  5. for line in instructions.splitlines():
  6. axis, zz = line.split()[-1].split('=')
  7. zz = int(zz)
  8. if axis == 'x':
  9. dots = {(x, y) if x < zz else (2 * zz - x, y) for x, y in dots}
  10. elif axis == 'y':
  11. dots = {(x, y) if y < zz else (x, 2 * zz - y) for x, y in dots}
  12. if ans1 is None:
  13. ans1 = len(dots)
  14. ans2 = '\n' + toolkit.render({complex(*k): '#' for k in dots})