Sign of a number
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
The program needs to read an integer from the console and then output -1, 0, or 1 depending on whether the input is negative, zero, or positive, respectively.
Input
A single integer.
Output
The signum of the provided number.
Examples
Input #1
Answer #1
Input #2
Answer #2
Input #3
Answer #3
Submissions 18K
Acceptance rate 57%