Ad
  • Custom User Avatar

    For n=10, Your solution returns :

             12345678910
            12345678910 
           12345678910  
          12345678910   
         12345678910    
        12345678910     
       12345678910      
      12345678910       
     12345678910        
    12345678910  
    

    Instead of :

             1234567890
            1234567890 
           1234567890  
          1234567890   
         1234567890    
        1234567890     
       1234567890      
      1234567890       
     1234567890        
    1234567890  
    

    To be more clear the pattern must be created using only unit digits of the numbers, see the examples again and understand the pattern carefully.