For what it's worth, in California 30 years ago, I dealt with this by "testing out" of all the classes between Algebra I (taken in 8th grade) and Calculus (taken in 9th grade). I did all of the quizzes for every chapter of every math class, which was a lot of work, but nicely filled up the time after the AP test when everyone else was watching movies or cutting class. Looking back, I am very grateful to my calculus teacher for agreeing to grade all those.

And I had a ridiculous amount of math on my transcript for freshman year, since I got credit for all those "tested out" classes. I could easily have graduated in 3 years if I'd wanted to.