LearnPy Hub
← Context Managers problems
Easy

Count the Blocks

Write a class Counter whose __enter__ adds 1 to a class attribute uses. Read n and enter with Counter(): n times in a loop. Print Counter.uses.

Input

One integer n ≥ 0.

Output

One integer.

Sample 1

Input
3
Output
3

Sample 2

Input
0
Output
0
solution.py
Output appears here
Count the Blocks · Python practice problem · LearnPy Hub