All problems

Fixing the Color Scale With vmin/vmax

mediumPythonSeabornvmin/vmax

Brindle & Co puts last month's grid next to this month's, and the colour scales keep sliding, so a quiet month looks alarming and a busy one looks calm. The fix is to nail both charts to the same scale, running from 0 to 50. Anything at or above 50 then comes out as the same top colour regardless of how far above it sits, and the caption has to say how many cells that swallowed.

Task: Print how many cells hold 50 or more.

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 a whole number: how many cells are 50 or more. A cell of exactly 50 counts.

Example:

Input:
2 2
10 60
70 20

Output:
2

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…