Files
PAT/html/b1036.html
T

29 lines
1.0 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" />
<h1>1036. 跟奥巴马一起编程(15)</h1>
<div id="problemContent">
<p>
美国总统奥巴马不仅呼吁所有人都学习编程,甚至以身作则编写代码,成为美国历史上首位编写计算机代码的总统。2014年底,为庆祝“计算机科学教育周”正式启动,奥巴马编写了很简单的计算机代码:在屏幕上画一个正方形。现在你也跟他一起画吧!
</p>
<p><b>
输入格式:
</b></p>
<p>
输入在一行中给出正方形边长N(3&lt;=N&lt;=20)和组成正方形边的某种字符C,间隔一个空格。
</p>
<p><b>
输出格式:
</b></p>
<p>
输出由给定字符C画出的正方形。但是注意到行间距比列间距大,所以为了让结果看上去更像正方形,我们输出的行数实际上是列数的50%(四舍五入取整)。</p>
<b>输入样例:</b><pre>
10 a
</pre>
<b>输出样例:</b><pre>
aaaaaaaaaa
a a
a a
a a
aaaaaaaaaa
</pre>
</div>