It’s definitely doable, but it will be challenging. You will need to create a custom form that drops the answers into a database. Then You will need to run an answer key against that entry, run the math and display the results.
As Brett said it is doable using a custom form developed using code. If you need any support just let.me know.