Your college education sounds very different from my US engineering background.
I have never done worse than when I took an exam on Adderall. The exams required genuine creative thinking and problem-solving using the knowledge built over 15 weeks.
Plus: many, many disciplines require memorization of quite a few facts to pass the course. CS included - you might have just had an easy time/forgotten about your freshman and sophomore courses that covered more basic elements like syntax, best practices, basic algos, etc.
I have never done worse than when I took an exam on Adderall. The exams required genuine creative thinking and problem-solving using the knowledge built over 15 weeks.