You would expect that but it is not the reality. I've seen many students that were excellent at math, but just could not get their head around CS. I'm not sure why this is and having asked some of them, they also couldn't explain it. They just couldn't 'see' it, and found creating the programs very hard.
Meanwhile they breezed through math classes that most CS minded students failed or found extremely hard (over here in the old days CS was a specialization of a Math degree before it became a degree in its own, so the CS undergraduate curricullum was very heavy on math)