#K83107. Process String Based on Ending Digits
Process String Based on Ending Digits
Process String Based on Ending Digits
You are given an 8-character string s that conforms to the following pattern:
- The first character is the letter
X
. - The following five characters are uppercase English letters (A-Z).
- The last two characters are digits (0-9).
Your task is to check if the last two characters of s are both 0
. In particular, if the last two characters are exactly 00
, you should print 0
; otherwise, print 1
.
In mathematical terms, let s be represented as a string where the last two characters form a substring d. You need to decide whether
\[
d = \mathtt{00}
\]
or not. If \(d=\mathtt{00}\), output 0
; otherwise, output 1
.
inputFormat
The input is read from standard input. It consists of a single line containing the 8-character string s following the pattern described above.
outputFormat
Print a single integer to standard output: 0
if the last two characters of s are both 0
, and 1
otherwise.
XABCDE00
0