HackerRank-Python攻城歷程-2.List comprehensions

HackerRank-Python攻城歷程-2.List comprehensions

1 if __name__ == '__main__':
2     x = int(input())
3     y = int(input())
4     z = int(input())
5     n = int(input())
6     print([ [ i, j, k] for i in range( x + 1) for j in range( y + 1) for k in range(z+1) if ( (i + j+ k) != n )])

 

相关文章:

  • 2022-12-23
  • 2021-08-03
  • 2022-01-24
  • 2022-12-23
  • 2022-01-17
  • 2021-06-28
  • 2022-12-23
猜你喜欢
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2021-09-30
  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
相关资源
相似解决方案