class asd32
{
        public static void main(String[] args)
        {
                for(int a=1,b=1;a<=5;a++)
                {        
                        for(;b<=(a*(a+1))/2;b++)
                        {        
                                System.out.print(b);
                        }
                        System.out.println(" ");
                }
        }
}
                

밑글에서 누가 물어보길래 해봤음,,,

시험끈나고 공부쫌해서 달팽이도 해봐야지,,