The natural numbers 1, 3, 9, 27, 81, and 243 are six given numbers. From these six numbers, take several numbers and sum each time (each number can only be used once each time), and a new one can be obtained. In this way, a total of 63 new numbers are obtained. If they are arranged in ascending order: 1, 3, 4, 9, 10, 12, ..., what is the 40th number?
自然数1、3、9、27、81、243是六个给定的数，从这六个数中每次取若干个数求和(每次每个数只能用一次)，可以得到一个新数，这样共得到63个新数．如果把它们从小到大排列起来是：1、3、4、9、10、12、…，第40个数是多少．
<gadget id="calculator">9 + 27 + 81 + 243</gadget>
<output>360</output>

<result>360</result>