Boolean
Boolean-22
Boolean-23
Boolean-24
~/algor $ cat problems/orta-raqam-eng-kattami
Is the middle digit the largest?
Easy
1000 ms
64 MB
17%
A three-digit positive integer $n$ is given. Check whether the statement is true: “the middle digit of $n$ is strictly greater than each of the two outer digits”. For example, it is true for $153$ and false for $155$.
Input
One three-digit positive integer $n$.
Output
One integer: $1$ if the statement is true, otherwise $0$.
Note
$100 \le n \le 999$
Examples
Input #1
192
Output #1
1
Input #2
991
Output #2
0