Shopping Cart Total with Invalid Item Filtering

Given a list of shopping-cart item records, calculate the total number of units and the total price of all valid items.

Each item is represented by one line in the following format:

name|sku...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: