L2 will sum the values of those indices of ways which is equal to ( N - ( c * 10 + d * 20 ) )
for c in range ( 0 , C ) : NEW_LINE INDENT if ( c * 10 > N ) : NEW_LINE INDENT break ; NEW_LINE DEDENT for d in range ( 0 , D ) : NEW_LINE INDENT if ( c * 10 + d * 20 > N ) : NEW_LINE INDENT break ; NEW_LINE DEDENT ans += ways [ N - c * 10 - d * 20 ] ; NEW_LINE DEDENT DEDENT