Then I think the way you described was the best method, I don't think given that information that there is any way to deduce with 100% certainty what the mass of a single screw is.
consider the total masses (where cup1, cup2, etc.. are the values you provided, "c" is the unknown mass of an empty cup, and "s" is the unknown mass of a screw)
cup1=c+vs
cup2=c+ws
cup3=c+xs
cup4=c+ys
cup5=c+zs
v, w, x, y, and z are the number of screws in each cup.
You want to find solutions to those equations such that all v, w, x, y, and z are integer values. (unless you can have a fraction of a screw, but I'll just assume not :) )
Considering that, there are technically an infinite amount of solutions.
say you find solutions of v, w, x, y, and z, and "s" turns out to be some value S.
You can start there and find another solution quite easily, try "s"=S/2 and this will simply mean that all of the v, w, x, y, and z values are twice as much as they were before.. but if they were all integers before, then multiplying by 2 would mean they are still integers
Therefore that is also a valid solution.
If it can be solved exactly with a single solution then it will probably have to involve some other kind of measurements, such as moving half the screws from one cup to another and re-measuring the mass, and repeating this in such a way that you can deduce the mass of a single screw.
But, you cannot have a method that will give you a unique solution mathematically, because one does not exist with the information provided.