JUDGER_AND_CLIENT/client/problem.html

5 lines
2.5 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.

<center><h1 style="font-family:verdana;color:blue">2.a/b 结果错误的示例</h1></center><center><p>&nbsp&nbsp时间限制1.0&nbsp&nbsp章节:分支结构</p></center><center><p>晚于2029-11-30 23:55:00.0&nbsp&nbsp后提交分数乘系数40.0%</p></center><center><p>截止时间2040-12-30 23:55:00</p></center><h2 style="font-family:verdana;color:blue">问题描述</h2><p style="white-space: normal;">输入两个实数a和b计算a/b的值并输出。<br/>如果b为0则输出error否则输出结果保留两位小数。</p><p style="white-space: normal;">&nbsp;</p><p style="white-space: normal;">如输入以下C语言代码<br/></p><p>#include &lt;stdio.h&gt;</p><p>int main()</p><p>{</p><p>&nbsp; &nbsp; double a,b,c;</p><p>&nbsp; &nbsp; while(scanf(&quot;%lf%lf&quot;, &amp;a, &amp;b) != EOF)</p><p>&nbsp; &nbsp; {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; c=a/b;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; printf(&quot;%.2f\n&quot;, c);</p><p>&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; return 0;</p><p>}</p><p style="white-space: normal;">运行结果将为WA如下</p><p><img src="./image/20160308/1457408473277086998.png" style="" title="1457408473277086998.png"/></p><p>从这里可看到本题共有4个测试用例其中3个已经运行正确ID为3021的测试用例运行错误错误的详细信息可从下面的 “详细信息”中了解到。</p><p>对于某些考试(练习),点图中的问号可查看测试用例的提示,这样可知道测试用例的输入、正确的输出以及本程序的输出。</p><p>对于某些考试不是AC的代码也可提交给教师评分则点“提交本题”即可。比如本题的分数为47.5分则“提交本题”后本场考试总分增加47.5分。但注意,一旦“提交本题”,对于本题不可再修改代码然后提交。</p><p><br/></p><p>如输入以下C语言代码</p><p>#include &lt;stdio.h&gt;</p><p>int main()</p><p>{</p><p>&nbsp; &nbsp; double a,b,c;</p><p>&nbsp; &nbsp; while(scanf(&quot;%lf%lf&quot;, &amp;a, &amp;b) != EOF)</p><p>&nbsp; &nbsp; {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; c=a/b;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; printf(&quot;%.2f\n&quot;, c);</p><p>&nbsp; &nbsp; }</p><p>}</p><p>由于程序没return 0所以结果将为RE运行结果如下</p><p><img src="./image/20160308/1457408473314071490.png" style="" title="1457408473314071490.png"/></p><p>本程序由于所有测试用例均不正确,则系统无法给分。如果“提交本题”,将由教师人工评分。</p><p><br/></p><h2 style="font-family:verdana;color:blue">输入说明</h2><h2 style="font-family:verdana;color:blue">输出说明</h2><h2 style="font-family:verdana;color:blue">输入范例</h2><textarea wrap="off" style="font-family:'宋体';width:100%" rows="4">1 0
1 2
</textarea><h2 style="font-family:verdana;color:blue">输出范例</h2><textarea wrap="off" style="font-family:'宋体';width:100%" rows="4">error
0.50
</textarea>