Luckily the professor let me take the final on my own later in the library, though he'd thought I had skipped it because I had a near-zero on the quizzes that were worth a few percentage points going into the final. However, there was a section on Taylor series which I hadn't seen before on the final, so I was certain that I had bombed it.
I wrote a long email talking about possible summer projects or something, so that I'd have the prerequisites for the next year. I got back a cheery email, "don't worry about it, you got an A, enjoy your summer!", and explaining that the Taylor series was kind of an extra to see if anyone could figure out the material that wasn't part of the course while taking the exam.
Obviously, I'd taken a lot of unwise risks, but I guess I got lucky with a professor who identified with an immature student who knew the material but had only taken a course because it was technically a prerequisite for something else.