Would help to have more details on the math. I would say try for the W but take the L. If you could do it with the formulas can’t you just remember a few important ones? If you only need to pass it might be enough to carry you through.
Imagine you hid a bit of paper successfully (seems difficult on it’s own but anyway): how do you check it? There will surely be people watching so you can’t go digging around in your shoe.
If you get caught cheating, there is a 0% chance you pass. If you try, the chance is higher than 0.
I don’t know the details but I’m sure there’s some other way around this where you won’t be totally fucked if it doesn’t go well