For this Question: Given an integer K, find a positive integer x such that <b>K = x<sup>2</sup> + 3*x</b>. If no such positive integer x exists, print -1.First and the only line of the input contains an integer K.

Constraints:
1 <= K <= 10<sup>18</sup>Print a positive integer x such that the above equation satisfies. If no such integer x exists, print -1.Sample Input:
28

Sample Output:
4

Explaination:
4<sup>2</sup> + 3*4 = 28
There is no other positive integer that will give such result., I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
    public static void main (String[] args) throws IOException{

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long K = Long.parseLong(br.readLine());

        long ans = -1;

        for(long x =0;((x*x)+(3*x))<=K;x++){

            if(K==((x*x)+(3*x))){
                ans = x;
                break;
            }
        }

        System.out.println(ans);

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