If the student got 123 marks and failed by 39, your first step would be to add the two together, getting 162. This is the amount of marks needed to pass the test.
You would then divide 162 by .36 (.36 is equivalent to 36%). This would result in a maximum of 450 marks.
The maximum marks on this test are 450 marks.