Home > Back-end >  , for help and error how to implement, quite disturbed, online etc.
, for help and error how to implement, quite disturbed, online etc.

Time:01-11

Subject content: will output data in a given sequence in reverse,

Input format: the first line the number of the data in the input sequence; The second line of input N data, separated by Spaces, (the input data are integer)

Output format: output after the reverse order of sequence data, separated by a space, the input output ERROR in the unreasonable

Input the sample: 3

1 2 3

The output sample: 3 2 1

CodePudding user response:

How is not reasonable? Have to order? Determine the input data is larger than the previous can realize ascending input,

CodePudding user response:

Input the reasonable rarely, unreasonable situation more than the ERROR:
The number of data is not a positive integer; But a 0, negative
The second line of data is less than N, more than N, other characters, instead of a space...

CodePudding user response:

reference 1st floor focuslight response:
what is unreasonable? Have to order? Determine the input data is larger than the previous can realize ascending input,

It is just reverse the elements of the inside of the array output, there is no size relations,
Unreasonable input refers to the number of elements in the array and the start input N is not equal

CodePudding user response:

refer to the second floor 4 teacher zhao response:
input and reasonable rarely, unreasonable situation more than the ERROR:
The number of data is not a positive integer; But a 0, negative
The second line of data is less than N, more than N, other characters, instead of a space...

May want to the more complex, the test is only the kind of situation, I said I N how can enter the plural