Files
PAT/html/a1001.html
T

16 lines
762 B
HTML

<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<h1>1001. A+B Format (20)</h1>
<div id="problemContent">
<p>Calculate a + b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits).</p>
<p><b>Input</b></p>
<p>Each input file contains one test case. Each case contains a pair of integers a and b where -1000000 &lt;= a, b &lt;= 1000000. The numbers are separated by a space.<p>
<p><b>Output</b></p>
<p>For each test case, you should output the sum of a and b in one line. The sum must be written in the standard format. </p>
<b>Sample Input</b><pre>
-1000000 9
</pre>
<b>Sample Output</b><pre>
-999,991
</pre>
</p></p></div>