Cases where all remaining digits are 4 or 7 ( Remaining sum of digits should be multiple of 4 or 7 )
if ( s % 7 == 0 ) : NEW_LINE INDENT b += 1 NEW_LINE s -= 7 NEW_LINE DEDENT elif ( s % 4 == 0 ) : NEW_LINE INDENT a += 1 NEW_LINE s -= 4 NEW_LINE DEDENT