输出示例:
雉兔同笼,兔有12只,雉有23只
rabbits = [x for x in range(1, 36) if x * 4 + (35 - x) * 2 == 94] print('雉兔同笼,兔有%d只,雉有%d只' % (rabbits[0], 35 - rabbits[0]))
2023-12-09 18:36:27
雉兔同笼,兔有12只,雉有23只
rabbits = [x for x in range(1, 36) if x * 4 + (35 - x) * 2 == 94] print('雉兔同笼,兔有%d只,雉有%d只' % (rabbits[0], 35 - rabbits[0]))
下一篇:力扣 35.搜索插入位置