P15250 [GeeksforGeeks] Check if divisible by 363149
普及-
题目描述

Given a number S in the form of string, the task is to find if it's divisible by 36 or not.

Example 1:
Input:
S = "72"
Output:
1

Example 2:
Input:
7
Output:
0

Your Task:
You don't need to read input or print anything. Your task is to complete the function checkDivisible36() which takes the string S and returns 1 is divisible by 36, else 0.

Expected Time Complexity: O(|S|)
Expected Auxiliary Space: O(1)

Constraints:
1 <= |S| <= 10^{5}

输入格式

见题面

输出格式

见题面

样例输入
S = "72"
样例输出
1