Skip to content

Commit

Permalink
new file: hackerrank/python/hr-list-comprehensions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mpsb committed Sep 20, 2020
1 parent 2b1b943 commit b14b493
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hackerrank/python/hr-list-comprehensions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if __name__ == '__main__':
x = int(input())
y = int(input())
z = int(input())
n = int(input())

a,b,c = 0,0,0

print([[a,b,c] for a in [i for i in range(x+1)] for b in [j for j in range(y+1)] for c in [k for k in range(z+1)] if a+b+c != n])

0 comments on commit b14b493

Please sign in to comment.