All problems

Displaying Cell Values With annot=True

easyPythonSeabornannot

Brindle & Co's aisle-by-hour footfall grid goes into the weekly pack with the number printed inside every coloured cell, because managers kept guessing wrong from the colour alone. The pack also carries one summary line underneath the grid: the store total, which is every printed number added together.

Task: Print the total of every value in the grid.

Input

The first line holds two integers separated by a single space: how many rows the grid has, then how many columns, each between 1 and 100. Then come that many rows, each holding that many numbers separated by single spaces.

Output

One line holding the grand total of the whole grid, rounded to 2 decimal places. The total, not an average, and over every cell rather than any one row or column.

Example:

Input:
2 2
1 2
3 4

Output:
10.00

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…