Nzec error in java code

how to solve nzec error. the code works fine on codechef ide but faces problem on other ides.

import java.io.;
import java.util.
;
class Pattern
{
public static void main(String args[])
{
Scanner sc= new Scanner(System.in);
int n=sc.nextInt();
int i,j,k,p;
for( i=1;i<=n;i++)
{
for( j=1;j<=(n-i);j++)
System.out.print(" ");
int num=i;
for( k=1;k<=i;k++)
{
System.out.print(num);
num++;
}
int num1;
num1=2*i-2;
for(p=1;p<=(i-1);p++)
{

      System.out.print(num1);
      num1++;
  }
  System.out.println("");

}
}
}

the intended pattern for n= 5
1
23 2
34545
4567678
56789891011

Hii Aastha,
Just remove import java.io.; and put * after java.util. i.e. import java.util.*;

sir i have done all this still it shows nzec error
it is probably releated to segmentation fault

the intended pattern is:

the code is:

Hii Aastha,
See after removing import.java.io; and by putting * after import.java.util. i.e. imort.java.util.*; your code works perfectly fine in coding blocks ide:
https://ide.codingblocks.com/s/63120

So it should work in other ide as well.