We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
List Comprehensions
List Comprehensions
Sort by
recency
|
1754 Discussions
|
Please Login in order to post a comment
I'm getting correct answer in other compiler but not here
from itertools import permutations,product
if name == 'main': x = int(input()) y = int(input()) z = int(input()) n = int(input())
num= list(range(0,max(x,y,z)+1)) numbers=list(product(num,repeat=3)) final_no=[list(x) for x in numbers if sum(x)!=n ] print(final_no)
print(final_no)
if name == 'main': x = int(input()) y = int(input()) z = int(input()) n = int(input())
Not sure how i did it :p
why isnt my code running successfully whereas other compilers give the answers correct