Input: S = "geeks5" Output: 1 Explanation : As geeks is of 5 length and at last number is also 5. Input: S = "geeksforgeeks15" Output: 0 Explanation: As geeksforgeeks is of 13 length and at last number is 15 i.e. not equal
The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. Each test case contains a string S.
For each test case in a new line print 1 if the condition holds else print 0.
1<=Length of string<=1000
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.