Numbers on the blackboard

Problem Name:
Numbers on the blackboard
Site:CodeForces
Links:
Tags:
Problem setters: