Returns count of substrings divisible by 8 but not by 3.
int count ( char s [ ] , int len ) { int cur = 0 , dig = 0 ; int sum [ MAX ] , dp [ MAX ] [ 3 ] ; memset ( sum , 0 , sizeof ( sum ) ) ; memset ( dp , 0 , sizeof ( dp ) ) ; dp [ 0 ] [ 0 ] = 1 ;