You are given a large number denoted by a string A, check if it is divisible by 7.
NOTE: You are not allowed to use modulo(%) operator.
1 <= |A| <= 105
String will not contain any leading zeros.
First and only argument is a string A denoting the number.
Return an integer 1 if A is divisible by 7, else return 0.
A = "35"
A = "3"
Since 35 is divisible by 7, Return 1.
Since 3 is not divisible by 7, Return 0.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.