013 Three Div Sequences
we are given a string called number, which represents an integer.
now we need to get the number of substrings that can be divisible by 3.
pay attention: the substring must can’t have leading zero unless it’s just zero.
of course we can do this in brute force way:
get every substrings of given string, check if it is valid.
then for every valid, parse it into int, and check if it is divisible by 3.

浙公网安备 33010602011771号