Files
PAT/source/html/b1056.html
T

14 lines
1.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
组合数的和
<div class="ques-view"><p>给定 N 个非 0 的个位数字,用其中任意 2 个数字都可以组合成 1 个 2 位的数字。要求所有可能组合出来的 2 位数字的和。例如给定 2、5、8,则可以组合出:25、28、52、58、82、85,它们的和为330。</p>
<h3 id="-">输入格式:</h3>
<p>输入在第一行中给出 N(1 <span class="katex"><span class="katex-mathml"><math><mrow><mo>&lt;</mo></mrow>&lt;</math></span><span aria-hidden="true" class="katex-html"><span class="strut" style="height:0.5391em;"></span><span class="strut bottom" style="height:0.5782em;vertical-align:-0.0391em;"></span><span class="base textstyle uncramped"><span class="mrel">&lt;</span></span></span></span> N <span class="katex"><span class="katex-mathml"><math><mrow><mo>&lt;</mo></mrow>&lt;</math></span><span aria-hidden="true" class="katex-html"><span class="strut" style="height:0.5391em;"></span><span class="strut bottom" style="height:0.5782em;vertical-align:-0.0391em;"></span><span class="base textstyle uncramped"><span class="mrel">&lt;</span></span></span></span> 10),随后一行给出 N 个不同的非 0 个位数字。数字间以空格分隔。</p>
<h3 id="-">输出格式:</h3>
<p>输出所有可能组合出来的2位数字的和。</p>
<h3 id="-">输入样例:</h3>
<pre><code class="lang-in">3
2 8 5
</code></pre>
<h3 id="-">输出样例:</h3>
<pre><code class="lang-out">330
</code></pre>
</div>