Xah Talk Show 2024-01-04 Ep526, Advent of Code, Day 6, Live Coding in WolframLang
- 12:27 on pascal creator Niklaus Wirth
- 21:28 finished reading problem
- 48:06 problem of advent of code
- 1:04:14 download wolfram lang free
- 1:08:59 discovered identity problem
- 1:43:50 part 1 solution
- 1:45:15 sponsorship time
- 1:46:34 JavaScript in Depth
- 1:42:44 best JavaScript books
- 1:59:32 make shortest code
input = "Time: 7 15 30
Distance: 9 40 200";
input = ReadString[ "C:/Users/xah/web/xahlee_info/talk_show/i/advent_of_code_2023_day_6_input.txt" ];
Times@@
MapThread[
((Total@ Cases[
IntegerPartitions[#1, {2}],
{a_, b_}/; a*b > #2 :> If[a===b,1,2]
] ) &),
ToExpression[ ((Rest@ StringSplit@#) &) /@ StringSplit[input, "\n"] ]
]