Function to return the maximum sum divisible by k from elements of v
static int find_max ( int i , int sum , int [ ] v , int k ) { if ( i == v . Length ) return 0 ; if ( dp [ i , sum ] != - 1 ) return dp [ i , sum ] ; int ans = 0 ;