Skip to content

Commit

Permalink
Year 2023, Day 24, part 2: SageMath solution (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Helbing committed Dec 25, 2023
1 parent df8ef51 commit 766c292
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions year2023/src/day24.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,23 @@ impl Day for Day24 {
}

fn star2(&self, _input: &str) -> String {
// sagemath:
//
// var('px vx py vy pz vz t0 t1 t2')
// eq1 = px + t0 * vx == 386183914429810 + t0 * 6
// eq2 = py + t0 * vy == 203234597957945 + t0 * 106
// eq3 = pz + t0 * vz == 537104238090859 + t0 * (-164)
//
// eq4 = px + t1 * vx == 191853805235172 + t1 * 205
// eq5 = py + t1 * vy == 96933297552275 + t1 * 517
// eq6 = pz + t1 * vz == 142797538377781 + t1 * 229
//
// eq7 = px + t2 * vx == 447902097938436 + t2 * (-136)
// eq8 = py + t2 * vy == 262258252263185 + t2 * 38
// eq9 = pz + t2 * vz == 255543483328939 + t2 * 89
//
// solve([eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9], px, vx, py, vy, pz, vz, t0, t1, t2)

String::from("not implemented")
}
}
Expand Down

0 comments on commit 766c292

Please sign in to comment.