As an additional data point, in 2000, both a fellow traveler and I were asked mathematical questions by US immigration officers in Canada. He answered correctly, I was unable to do so, but we were both allowed to enter without further investigation. I thought the experience was fine.
I have had less pleasant, aggressive questioning dealing with British immigration when flying into Heathrow as well as Irish immigration when flying out of Heathrow, though in the latter case the proximal cause was my fellow traveler choosing to lie. :(