Recursive call
checkIfPossibleRec ( x + a , a , b , isPossible , n ) NEW_LINE checkIfPossibleRec ( x + b , a , b , isPossible , n ) NEW_LINE def checkPossible ( n , a , b ) : NEW_LINE isPossible = [ False ] * ( n + 1 ) NEW_LINE checkIfPossibleRec ( 0 , a , b , isPossible , n ) NEW_LINE return isPossible [ n ] NEW_LINE