Log Report

Hard · Scripts · grep · wc · Functions · Pipelines

Problem

app.log has lines beginning with a level: INFO, WARN or ERROR.

Print a report — one line per level, in that order — as : . Then print worst: , naming the most severe level that actually occurs (ERROR over WARN over INFO), or worst: none if the log is empty.

Examples

Input: 2 INFO, 1 ERROR
Output: INFO: 2
WARN: 0
ERROR: 1
worst: ERROR

Approaches

Start free on Cariara · Coding problems · System design studio

Starting Python
No results yet.

          
↑↓ move ↵ open esc close

Labs

Loading labs…

Run with your own input

Starting Python

Loading Python…