Untitled
unknown
plain_text
2 years ago
286 B
6
Indexable
def rec_sum(s,coin): if s==0: print("Finish") return True if s<0 : return False for _ in coin: if rec_sum(s - _, coin): return True return False if __name__ == '__main__': coin = set([7,3]) print(rec_sum(11,coin))
Editor is loading...