Sum the Imported Amounts

Intermediate

A CSV import delivers amounts as text. Before they can be totalled they must be parsed to numbers. Return the numeric sum of a list of numeric strings.

Implement `solve(List<String> values)` where each is a numeric string, returning their numeric sum.

Examples

Input["10", "20", "5", "15"]
Output50
Input["100"]
Output100
Hints
  • Integer.valueOf(s) parses a numeric string.
Anonymous Apex

Your code runs in a secure sandbox against multiple hidden test cases. The problem is solved only when every test passes. Each run is isolated and any data changes are rolled back automatically.