擅长:python、mysql、java
<p>我将使用模和余数运算:</p>
<pre><code>def modulo_and_remainder(a, b):
return a//b, a %b
def stamps(a):
five, rem = modulo_and_remainder(a, 5)
two, one = modulo_and_remainder(rem, 2)
return five, two, one
</code></pre>
<p>或者(甚至不知道)您可以使用内置的divmod:</p>
^{pr2}$