The test he took is the FCAT. It has some multiple choice questions, but most questions allow you to input any number which fits in up to five characters (including fractions and decimals). So, answers like "12345" or "123.4" or "1.234" or "1/234" or "123/4" or shorter answers. Ignoring the use of leading zeros, there are 100000 non-decimal answers. There are 10000 answers with the decimal in the second place (answers with the decimal in the first place are not allowed), but 10 of those are integers, so 9990 new answers. There are 10000 answers with the decimal in the third place, but 1000 of those are zero-adjusted duplicates of answers with the decimal in the second place (1.230 is the same as 01.23) and 90 of those are integers which aren't zero-adjusted duplicates of the last group so 8910 new answers. There are 10000 answers with the decimal in the fourth place, but 1000 of those are zero-adjusted duplicates of the last group and 900 of those are integers which aren't zero-adjusted duplicates of the last group. so 8100 new numbers. So there are 10000+9990+8910+8100 = 37000 possible decimal and integer answers. And there are also 3000 possible fractional answers, some of which simplify to the same thing or are equal to decimal numbers. So, each question has 40000 possible distinct answers.
However, the odds of correctness when guessing randomly is not 1/40000 because many questions have more than 1 correct answer both because they'll accept fractions or decimals for some and because for others, they have a small range around the correct decimal answer which is still considered correct due to being close enough. But, realistically, I think that on average, you'd probably have about a 1/5000 chance of guessing correctly by guessing randomly on those.
So when he says he guessed and got things correct, he probably means that he didn't know the answer, but guessed how to solve the problem. There are also a few four-answer multiple choice questions involved, but not nearly so many as 40. More like 10 or so.