Gold mining

Report a typo

Three dwarfs — Dwalin, Balin, and Thorin — went gold mining one day. They are very scrupulous, so the weight of the mined ore is measured very accurately. Calculate how much gold ore the three of them mined.

Input: Dwalin, Balin, Thorin: BigDecimal

Output: totalGold: BigDecimal

Sample Input 1:

7.00000000000000000000000000000001
8.7777777777777772
1.999999999999999999999999999999999999

Sample Output 1:

17.777777777777777200000000000000009999

Sample Input 2:

20.00000000000000000000001
19.000000000000000000000002
20.00000000000000000000000001

Sample Output 2:

59.00000000000000000000001201
Write a program in Kotlin
import java.math.BigDecimal

fun main() {
// write yor code here

}
___

Create a free account to access the full topic