Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def verificaMultiplo(a,x,k):
- if isNull(a):
- return False
- return auxmultiplo(a,x,k,0)
- def auxmultiplo(a,x,k,liv_corrente):
- if isNull(a):
- return True
- if liv_corrente > k:
- return info(a) % x == 0 and auxmultiplo(left(a),x,k,liv_corrente + 1) and auxmultiplo(right(a),x,k,liv_corrente + 1)
- else:
- return auxmultiplo(left(a),x,k,liv_corrente + 1) and auxmultiplo(right(a),x,k,liv_corrente + 1)
Advertisement
Add Comment
Please, Sign In to add comment