Input Conditions


#1

I think they should have mentioned that input consists only of positive integers.


#2

The constraints are mentioned in the question.