Little explorations with HP calculators (no Prime)
|
12-29-2018, 12:10 AM
(This post was last modified: 12-29-2018 12:24 PM by Albert Chan.)
Post: #333
|
|||
|
|||
RE: Little explorations with HP calculators (no Prime)
Hi 3298
Sorry I do not follow the logic ... (balls cannot be "rearranged", see post #331) Actually match_count function (with head + tail version) already proved it. Inside the loop: s = s - h + t, where h and t = 0 or 1 Thus s is only allowed changes of 0, ±1 s started as sum(head), ended as sum(tail), this implied s visited every integer within the gap. If gap = 0, sum(head) = sum(tail) = 50, we found the sublist. If not, 50 is within the gap of visited integers, s must be 50 at some point. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 6 Guest(s)