For just 52 for example 2 is a prime factor twice, because (52/2)/2 = 13, which is no longer divisible by 2.
Or in other words 52! / (2^49) is an integer, but 52! / (2^50) is not, thus 49 is the correct answer.
Could I recommend phrasing this kind of comment as a question in future? (Notwithstanding the lifehack of making a false statement in the internet being the shortest path to an answer.)
Let me elaborate:
I am not 100% sure what user qsort meant by "binary search", but one of the simplest manual algorithms I can think of is to use input bits as decision points in binary-search-like input state split: you start with 52 cards, depending on first input bit you take top or bottom half of the set, then use 2nd input bit to select top or bottom of the subset, and so on, repeat until you get to a single card. Then place it in the output, remove from input stack, and repeat the procedure again. Note there is no math at all, and this would be pretty trivial to do with just pen & paper.
What would be the resulting # of bits encoded this way? With 54 cards, you'd need to consume 5 to 6 bits, depending on input data. Once you are down to 32 cards, you'd need 5 bits exactly, 31 cards will need 4-5 bits depending on the data, and so on... If I'd calculated this correctly, that's at least 208 bits in the worst case, way more that 51 bits mentioned above.
(Unless there is some other meaning to "51" I am missing? but all I see in the thread are conversations about bit efficiently...)
My calculator says 225 bits, and text suggests the same. Looks like chatgpt4 was wrong as usual:)