and B bought the same number of letter paper. A puts 1 letter paper in each envelope, and there are 40 letter papers left after all the envelopes are used up; B puts 3 letter papers in each envelope, and 40 envelopes are left after all the letter papers are used up. How many pieces of letter paper did they buy?
A、B两人买了相同张数的信纸．A在每个信封里装1张信纸，最后用完所有的信封还剩40张信纸；B在每个信封里装3张信纸，最后用完所有的信纸还剩40个信封．他们都买了多少张信纸．
<gadget id="calculator">40 * 3</gadget>
<output>120</output>

<gadget id="calculator">120 + 40</gadget>
<output>160</output>

<gadget id="calculator">3 - 1</gadget>
<output>2</output>

<gadget id="calculator">160 / 2</gadget>
<output>80</output>

<gadget id="calculator">1 * 80</gadget>
<output>80</output>

<gadget id="calculator">80 + 40</gadget>
<output>120</output>

<result>120</result>