This page is still under construction.

Parts of this page are still being built. What you see may change.

Billing

Interview

Time limit1sMemory limit128 MB

Summary
Read item names until EOI and print the total cost of all listed supplies with a dollar sign and two decimals.
Level

Easy1 of 10

Topics
Hash map, Implementation
Solved
No attempts yet

Problem

The accounting office needs to bill each department for the supplies purchased last semester. The chart below lists every supply item and its cost. Write a program that reads a list of purchased supplies and computes the total cost.

ItemCost
Paper57.99
Printer120.50
Planners31.25
Binders22.50
Calendar10.95
Notebooks11.20
Ink66.95

Input

The input is a list of office supplies, one item name per line. The end of the list is denoted by the string EOI. Every item name matches a name in the chart above exactly.

Output

Print the total cost of all items in the list. The output must start with a dollar sign $ and show the total with exactly two decimal digits.

Examples1

  1. Example 1

    Input
    Binders
    Calendar
    Ink
    Notebooks
    Binders
    Ink
    EOI
    
    Expected output
    $201.05