Function to check if the sum of natural numbers from K to N is >= X
def isGreaterEqual ( N , K , X ) : NEW_LINE INDENT return ( ( ( N * ( N + 1 ) // 2 ) - ( ( K - 1 ) * K // 2 ) ) >= X ) NEW_LINE DEDENT