Time Limit: Java: 2000 ms / Others: 2000 ms

Memory Limit: Java: 65536 KB / Others: 65536 KB

Given a list of monetary amounts in a standard format, please calculate the total amount.

We define the format as follows:

1. The amount starts with '$'.

2. The amount could have a leading '0' if and only if it is less then 1.

3. The amount ends with a decimal point and exactly 2 following digits.

4. The digits to the left of the decimal point are separated into groups of three by commas (a group of one or two digits may appear on the left).

提交代码