All problems

The Completeness Report

easyPythonData Cleaning

Ferndown Utilities audits every column of a customer file before it is loaded, and the first thing the audit states is how complete that column is. Wherever a value was absent, the export writes the exact text NULL on the line instead. The report always shows both halves of the picture, because a number of gaps means nothing to a reader who does not also know how much was there.

Task: Print how many values are missing and how many are present.

Input

The first line holds one integer n, how many values follow. Each of the next n lines holds either a value or the exact text NULL, meaning that value was absent. A line may also be empty; only the exact text NULL counts as missing, so an empty line is a value like any other. A column may be entirely missing, and it may be entirely complete.

Output

Two lines, missing first. The first reads missing, one space, then how many lines held NULL. The second reads present, one space, then how many lines held anything else. Both labels are lowercase.

Example:

Input:
5
12
NULL
7
NULL
3

Output:
missing 2
present 3

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…