擅长:python、mysql、java
<p>让我们从第一部分开始,确保两个字符串的长度相同。因为它们是数字,你只需要'0'填充较短的数字</p>
<pre><code>max_len = max(len(S), len(T))
# the more simple to understand way
while len(S) < max_len: S = '0' + S
while len(T) < max_len: T = '0' + T
# or you can use this python trickery
S = ('0' * (max_len - len(S))) + S
T = ('0' * (max_len - len(T))) + T
</code></pre>
<p>对于运载工具,您的运载工具应如下所示:</p>
^{pr2}$
<p>希望有帮助</p>