Files
PAT/source/html/b1024.html
T
2018-12-23 20:01:49 +08:00

27 lines
2.9 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.
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
.katex-html {display: none;}
.katex-mathml {font-size: 0px;}
.katex-mathml math mrow {font-size: 16px;}
</style>
<h1>科学计数法</h1>
<div class="ques-view"><p>科学计数法是科学家用来表示很大或很小的数字的一种方便的方法,其满足正则表达式 [+-][1-9]<code>.</code>[0-9]+E[+-][0-9]+,即数字的整数部分只有 1 位,小数部分至少有 1 位,该数字及其指数部分的正负号即使对正数也必定明确给出。</p>
<p>现以科学计数法的格式给出实数 <span class="katex"><span class="katex-mathml"><math><mrow><mi>A</mi></mrow>A</math></span><span aria-hidden="true" class="katex-html"><span class="strut" style="height:0.68333em;"></span><span class="strut bottom" style="height:0.68333em;vertical-align:0em;"></span><span class="base textstyle uncramped"><span class="mord mathit">A</span></span></span></span>,请编写程序按普通数字表示法输出 <span class="katex"><span class="katex-mathml"><math><mrow><mi>A</mi></mrow>A</math></span><span aria-hidden="true" class="katex-html"><span class="strut" style="height:0.68333em;"></span><span class="strut bottom" style="height:0.68333em;vertical-align:0em;"></span><span class="base textstyle uncramped"><span class="mord mathit">A</span></span></span></span>,并保证所有有效位都被保留。</p>
<h3 id="-">输入格式:</h3>
<p>每个输入包含 1 个测试用例,即一个以科学计数法表示的实数 <span class="katex"><span class="katex-mathml"><math><mrow><mi>A</mi></mrow>A</math></span><span aria-hidden="true" class="katex-html"><span class="strut" style="height:0.68333em;"></span><span class="strut bottom" style="height:0.68333em;vertical-align:0em;"></span><span class="base textstyle uncramped"><span class="mord mathit">A</span></span></span></span>。该数字的存储长度不超过 9999 字节,且其指数的绝对值不超过 9999。</p>
<h3 id="-">输出格式:</h3>
<p>对每个测试用例,在一行中按普通数字表示法输出 <span class="katex"><span class="katex-mathml"><math><mrow><mi>A</mi></mrow>A</math></span><span aria-hidden="true" class="katex-html"><span class="strut" style="height:0.68333em;"></span><span class="strut bottom" style="height:0.68333em;vertical-align:0em;"></span><span class="base textstyle uncramped"><span class="mord mathit">A</span></span></span></span>,并保证所有有效位都被保留,包括末尾的 0。</p>
<h3 id="-1-">输入样例 1:</h3>
<pre><code class="lang-in">+1.23400E-03
</code></pre>
<h3 id="-1-">输出样例 1:</h3>
<pre><code class="lang-out">0.00123400
</code></pre>
<h3 id="-2-">输入样例 2:</h3>
<pre><code class="lang-in">-1.2E+10
</code></pre>
<h3 id="-2-">输出样例 2:</h3>
<pre><code class="lang-out">-12000000000
</code></pre>
</div>