Comparing the relative contribution of 3 factors to a composite score per group

Hi everyone,
I would like to ask for help with the following question: I have the results of three different groups in a math test. The test score is actually a composite score calculated as the total sum of correctly solved problems * problems difficulty. There are 5 levels of difficulty weighed by 0.2, 0.4, 0.6, 0.8, and 1, respectively, and subjects can choose the total number of problems to solve (from 1 to 100) and the difficulty of each problem they decided to face.

What I would like to compare is how each component (total number of problems attempted, chosen difficulty, and performance accuracy) contributes to the overall test scores observed in each group. I have thought to perform independent regressions in each group (using as predictors the total number of problems attempted, the mean level difficulty chosen, and the proportion of correctly solved problems) and then comparing the obtained regression standardized weights for each predictor in each group... However, I am not really sure if this would be an appropriate way to do so or if there are better alternative methods.

Thanks in advance for any possible answer.
Last edited: