Compute the Euclidean (L2) norm of a non-empty real vector. Entries may be extremely large or extremely small, so the computation must not overflow or underflow.
Implement solve(x).
Returns. Return the norm as a Python float. The all-zero vector has norm 0.0.
Example 1
Input:
solve([3.0, 4.0])
Output:
5.0
Example 2
Input:
solve([3e200, 4e200])
Output:
5e+200
No results yet
Run your code to check it against the examples, or submit to run every test.