FInd an integer m satisfying and in each of the following questions.where for .(i)

so I need the number to be

where for .(ii).

.

But I require a number m such that

Combining my above results reveals the number I need to be .

Comparing this with gives .

My method seems to be working pretty well (i've checked them all on a calculator) but is there an easier way to do them?