Incorrect input format
Output limit exceed is an error that exceeds the output limit (OLE), prompting your program to generate too much output information, usually caused by an endless loop.
The main cause of the above error is that the while (scanf ("% d", & N) loop statement is generated. Because when the scanf function has input data, the return value is the number of data reads. When no data is input, the returned value is-1 (pre-defined as EOF ). For example, if this program reads an N value and 4 and 5 at the beginning of each line in sample input, 1 is returned. If no data is input,-1 is returned, in this case, if the cycle condition is not 0 and permanent, an infinite loop is formed.
Therefore, you need to modify the statement to: While (scanf ("% d", & N )! =-1) or while (scanf ("% d", & N )! = EOF), when no data is input, the cycle condition is 0 and the loop is exited.
Of course, the C language and C ++ input formats are involved here.