Sum of digits for each element in vector
for i in range ( len ( a ) ) : NEW_LINE INDENT c = 0 NEW_LINE while ( a [ i ] > 0 ) : NEW_LINE INDENT c += a [ i ] % 10 NEW_LINE a [ i ] = a [ i ] // 10 NEW_LINE DEDENT a [ i ] = c NEW_LINE DEDENT return a NEW_LINE