Fill rest of the elements with 1
for ( int i = P + 1 ; i <= N ; i ++ ) arr [ i ] = 1 ; cout << " The ▁ Minimum ▁ Possible ▁ Sum ▁ is : ▁ " << ans << " STRNEWLINE " ; cout << " The ▁ Array ▁ Elements ▁ are : ▁ STRNEWLINE " ; for ( int i = 1 ; i <= N ; i ++ ) cout << arr [ i ] << ' ▁ ' ; }