• + 2 comments

    please help me someone. why for input .

    1
    3
    1 5 5
    
    output is 3 
    but ans should be 4 as
     
    1- 1+2,5,5+2 -- 3,5,7
    2- 3+2,5,7+2 -- 5,5,9
    3- 5+2,5+2,9 -- 7,7,9
    4- 7+2,7+2,9 -- 9,9,9 
     
    ans is 4