how this TLE with a negative value is caused? , any common errors to look for? I’m quite new to cpp, Logic is working fine on my system with no error,
PS: when to use return, break or any other keyword to exit the program on wrong input by the grader.