Simple Counter

Programming Interview Easy 10 views
Back to Questions

Problem Description

You have q commands: INC, DEC. Create Counter class. DEC cannot go below 0. Output final value.

Input Format

First line q. Next q lines commands.

Output Format

One integer value.

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next