#PCBTAM0000017. Số 0 và chuỗi số 0 (Zero Number and Nonempty String)
Số 0 và chuỗi số 0 (Zero Number and Nonempty String)
Zero Number and Nonempty String
Version: Phuoc Hung OJ Extended
Problem Statement
A text string represents a valid decimal integer; it may have a + or - sign and leading zero digits. Distinguish these three values:
- Boolean value of the string:
Trueif it is nonempty. - Boolean value of the represented integer:
Falseonly if the value is . - Original text length, counting an optional sign and every leading zero.
Do not remove leading zeros before determining the text length.
Input
One line contains : an optional + or - sign followed by at least one ASCII digit, with no spaces.
Output
Print three lines: the string's Boolean value, the integer's Boolean value, and the original string length. Use exactly True or False for Boolean values.
Subtasks
- Subtask 1 (100 points): ; .
Examples
Example 1
Input
0
Output
True
False
1
Explanation. Text 0 is nonempty and therefore True; the integer zero is False; text length is .
Example 2
Input
000
Output
True
False
3
Explanation. 000 is nonempty text of length but represents integer zero.
Example 3
Input
-12
Output
True
True
3
Explanation. -12 is nonempty and nonzero; both Boolean values are True, and its sign counts toward length .