If you properly understand those rules and convert them to code (as in the OP) then searching the possible answers for a match is trivial.
The Singaporean government doesn't think Singapore English is a valid thing and wants everyone to learn "good" English. The Singaporean upper class is, as usual, on the government's side, and will complain about the poor English education in their country. That's fine for them, but please be aware that when you say "this is bad English" you are making a cultural and class-based judgment. What you really mean is the math question uses a way of expressing time that is familiar to them but not familiar to you.
People might very well be able to solve even fairly complex logic problems without having been exposed to this tradition of encoding such problems.
The problem is stated as three persons having an odd, but casual conversation. To outsider that's all they're doing and to those the problem is impenetrable. Insiders, however, immediately recognise the informal protocol of logic quizzes that this is not a random casual conversation, it is carefully written to encode just enough information to be solvable as a logic problem. These insiders know to carefully extract (decode) this information. Only then do they solve the logic problem.
The "dishonesty" of the problem, which is confusing to people expecting the problem to be stated honestly, is that the conversation in the problem is entirely contrived, there is no way is would ever happened as part of a real world exchange about birthdays. This is fine for the intendeded reader, school kids trained in this protocol, but in "going viral" it went to a lot of unintended recipients.
When Albert says I don't know when Cheryl's birthday is, but I know that Bernard does not know too, consider There are no unique days in the month I was told.
Informally, note the difference of order. If Albert said "I was told the Birthday is in July", that would be, say, first order. The plain version I provide is a logical statement about the months and dates, a second order statement. But the cryptic version is a statement about what (second-order) statements Bernard can make, so third order. Hence, cryptic.
Which is probably intended, as otherwise I would have thought he meant to say "before Cheryl had told me, I didn't know".
In the context of Albert's statement though, it couldn't mean that - Albert's statement is saying that Bernard does not have enough information to determine the date just based on what Cheryl told him, so in saying "at first I did not know, but now I know", the only difference between "at first" and "now" is Albert speaking.
So Bernard's comment could only mean, "Based on what Cheryl told me, I did not know what the birthday was, but given the extra information I have as a result of Albert's statement, now I know"