public class Main { public static void main(String[] args) { long[]arr=new long[10]; arr[0]=9; long sum=9; for(int i=0;i<9;i++){ arr[i+1]=arr[i]*10+9; sum+=arr[i+1]; } System.out.println(sum); } }