Alvin, Calvin and Melvin each have some positive integer number of sweets. Alvin has fewer sweets than Calvin, and they have 31 sweets in total. Melvin has 24 sweets more than Alvin.

What is the maximum number of sweets that they can all have in total?

Let A = number of sweets of Alvin

Let C = number of sweets of Calvin
Let M = number of sweets of Melvin
According to the statements,
A < C
A + C = 31
M = A + 24

Note that to maximize M, A should also be maximized. Maximum value of A is 31 (that is, if C = 0), but according to the first condition, C should be greater than A.
Therefore, maximum value of A, where it is less than C is 15, and thus C is equal to 16.
If A is 15, M should be 39.
A = 15, C = 16, M = 39
Total: 70 sweets

Hope this helps :)