#C6101. Shared Bill Calculation

    ID: 49825 Type: Default 1000ms 256MiB

Shared Bill Calculation

Shared Bill Calculation

A group of friends dines together and decides to split the bill. Each friend orders one or more items with known costs. If the total bill exceeds \(100\), they receive a 10% discount on the entire bill. The discount is applied proportionally according to each person’s individual order. Calculate the amount each friend must pay, rounding the result to two decimal places.

inputFormat

The input is provided via stdin as a single line JSON object. Each key in the object is a friend's name and its value is an array of numbers representing the prices of the items they ordered.

outputFormat

Output the result to stdout as a JSON object. Each key should be a friend's name and its corresponding value is the final amount the friend must pay after any applicable discount, rounded to two decimals.

## sample
{"Alice": [30.12, 20.45], "Bob": [25.60, 15.25], "Charlie": [50.00]}
{"Alice": 45.51, "Bob": 36.77, "Charlie": 45.00}