Hackerrank - Sherlock and the Beast
My non-exhaustive list of comments, considering that you seem to prefer (based on observed skill level) plain Java and do not want to use Java 8 yet.


Adhere to the Java's coding standards. One of the catches here is that method names are in camelCase, so it would be private static String solve(int n) {.
Intendation and code formatting. You seem to not be using a single standard for all your code. Furthermore I have to say that using spaces where neccessary will not cause any harm, some examples and improvements.

2.1. for(int i = 0; i &lt; t; i++){ -> for (int i = 0; i &lt; t; i++) {

2.2. long combos = (long)Math.pow(2,n); -> long combos = (long)Math.pow(2, n);

2.3. if(threes%5==0) { -> if (threes % 5 == 0) {

Please be consistent with your formatting is the bottom line.
On to the next point, variable names. It does not hurt to use longer variable names if that makes them more meaningful. In your main you have a variable called t, this name is not descriptive, please consider describing what it actually means. Another example is i, ii and iii in your for-loops, it is much more natural to use i, j, k for these variables.
You could use more abstraction, as your solve method is not easy to follow at all. Consider creating smaller methods that process one step at a time, this will also enable you to be able to test your methods at some point.