fork download
  1. def rest(n):
  2. """Number of ways to place the remaining n edges."""
  3. return n * 2 * rest(n - 1) if n > 1 else 1
  4. c1 = 6 * rest(8)
  5. c2 = 3 * rest(4) + 12 * rest(5)
  6. c3 = 12 * rest(2) + 8 * rest(3)
  7. c6 = 1
  8. total = c1 - c2 + c3 - 10 * c6
  9. lars = 30942374
  10. print(total, lars, total - lars)
Success #stdin #stdout 0.1s 10088KB
stdin
Standard input is empty
stdout
30942374 30942374 0