Problem with the compiler

Well i tried this code in java but still the same error is popping everytime despite the code running well in intellij IDEA. Same thing, for python also I am getting script.py EOF errors.

Kindly look into the matter.

Can you please share your code , so i can look into it.

Scanner s = new Scanner(System.in);
int n = s.nextInt();

    int nst = -1;
    int row=1;
    while(row<=n){
        int col=n;
        int p = 1;
        while(col>=row){
            System.out.print(p+" ");
            p=p+1;
            col=col-1;
        }
        int starcol=1;
        while(starcol<=nst){
            System.out.print("*" + " ");
            starcol = starcol+1;
        }
        nst+=2;
        System.out.println();
        row=row+1;
    }

This code I had written in JAVA first but it is running fine on intellij. I have just provided the main code

I submitted the code sent by you above.
It is working fine and passing all the test cases , so please try again to submit the same.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.