For this Question: A number X is special if X is divisible by sum of digits of X. For example 24 is special because it is divisible by 6 (2+4). You are given Q queries where in each query you are given q[i] and you have to report the q[i]th positive special number.First line of input contains Q. Next Q lines contains q[i].

Constraints :
1 <= Q <= 10000
1 <= q[i] <= 100000For each query print the q[i]th special number in a new line.Sample Input
5
1
2
10
11
12

Sample Output
1
2
10
12
18, I have written this Solution Code: import java.io.*; // for handling input/output
import java.util.*; // contains Collections framework

// don't change the name of this class
// you can add inner classes if needed
class Main {

	static void preCompute(int arr[])
	{
		
		arr[0] = 0;
		int itr = 1;
		for(int i=1;i<=2000000;++i){
			int x=f(i);
			if(i%x==0)
				arr[itr++] =  i;
		}
	}

	static int f(int x)
	{
		int s=0;
		while(x > 0)
		{
			s+=x%10;
			x/=10;
		}
		return s;
	}
	public static void main (String[] args) {
                      // Your code here
		int arr[] = new int[10000001];			  
		preCompute(arr);
		Scanner sc = new Scanner(System.in);
		int queries = sc.nextInt();
		
		while(queries-- > 0)
		{
			int n = sc.nextInt();
			System.out.println(arr[n]);
		}


	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?