I showed it to my teacher and asked it if it would be considered cheating to use it on the test, and she said that if I knew the material so well that I could write a program that didn't just solve it, but showed the work, then clearly I knew the material so well that I'd ace the test even without the program, so I could go ahead and use it, just as long as I didn't share the program with my friends.
I didn't have any friends (This was 1998 where being such a nerd was still looked down on), so it wasn't an issue.