You are viewing a single comment's thread. Return to all comments →
if __name__ == '__main__': x = int(input()) y = int(input()) z = int(input()) n = int(input()) l = [] for _ in range(z+1): l.append([0,0,_]) for _ in range(y+1): for __ in range(z+1): if [0,_,__] not in l: l.append([0,_,__]) for _ in range(x+1): for __ in range(y+1): for ___ in range(z+1): if [_,__,___] not in l: l.append([_,__,___]) final_corord = [ _ for _ in l if sum(_) !=n ] print(final_corord
Seems like cookies are disabled on this browser, please enable them to open this website
List Comprehensions
You are viewing a single comment's thread. Return to all comments →