1422 - 六角幻方(2014决赛题C/C++A组第2题)

通过次数

0

提交次数

0

时间限制 : 1 秒
内存限制 : 128 MB

 

<span style="font-size:22pt;"><span>•</span></span><span style="font-family:Arial;color:black;font-size:22pt;"><span>&nbsp;&nbsp;&nbsp; </span>把 </span><span style="font-family:Arial;color:black;font-size:22pt;">1 2 3 ... 19 </span><span style="font-family:宋体;color:black;font-size:22pt;">共</span><span style="font-family:Arial;color:black;font-size:22pt;">19</span><span style="font-family:宋体;color:black;font-size:22pt;">个整数排列成六角形状,如下:</span> 

<span style="font-size:22pt;"><span>•</span></span><span style="font-family:Arial;color:black;font-size:22pt;"><span>&nbsp;&nbsp;&nbsp; </span>* * *</span> 

<span style="font-size:22pt;"><span>•</span></span><span style="font-family:Arial;color:black;font-size:22pt;"><span>&nbsp;&nbsp; </span>* * * *</span> 

<span style="font-size:22pt;"><span>•</span></span><span style="font-family:Arial;color:black;font-size:22pt;"><span>&nbsp; </span>* * * * *</span> 

<span style="font-size:22pt;"><span>•</span></span><span style="font-family:Arial;color:black;font-size:22pt;"><span>&nbsp;&nbsp; </span>* * * * </span>

<span style="font-size:22pt;"><span>•</span></span><span style="font-family:Arial;color:black;font-size:22pt;"><span>&nbsp;&nbsp;&nbsp; </span>* * *</span> 

<span style="font-size:22pt;"><span>•</span></span><span style="font-family:Arial;color:black;font-size:22pt;"><span>&nbsp;&nbsp;&nbsp; </span>要求每个直线上的数字之和必须相等。共有</span><span style="font-family:Arial;color:black;font-size:22pt;">15</span><span style="font-family:宋体;color:black;font-size:22pt;">条直线哦!</span> 

<span style="font-size:22pt;"><span>•</span></span><span style="font-family:Arial;color:black;font-size:22pt;"><span>&nbsp;&nbsp;&nbsp; </span>再给点线索吧!我们预先填好了</span><span style="font-family:Arial;color:black;font-size:22pt;">2</span><span style="font-family:宋体;color:black;font-size:22pt;">个数字,第一行的头两个数字是:</span><span style="font-family:Arial;color:black;font-size:22pt;">15 13</span><span style="font-family:宋体;color:black;font-size:22pt;">,参见图</span><span style="font-family:宋体;color:black;font-size:22pt;">【p1.png】</span><span style="font-family:宋体;color:black;font-size:22pt;">,黄色一行为所求。</span>

<img alt="" src="http://tk.hustoj.com:80/attached/image/20150425/20150425074351_53836.png" /><span style="font-family:宋体;color:black;font-size:22pt;"></span>&nbsp;

<span style="font-size:22pt;"><span>•</span></span><span style="font-family:Arial;color:black;font-size:22pt;"><span>&nbsp;&nbsp;&nbsp; </span>请你填写出中间一行的</span><span style="font-family:Arial;color:black;font-size:22pt;">5</span><span style="font-family:宋体;color:black;font-size:22pt;">个数字。数字间用空格分开。</span> 

<span style="font-size:22pt;"><span>•</span></span><span style="font-family:Arial;color:black;font-size:22pt;"><span>&nbsp;&nbsp;&nbsp; </span>这是一行用空格分开的整数,请通过浏览器提交答案,不要填写任何多余的内容(比如说明性的文字等)</span> 

输入

输出

样例

输入


                            

输出


                            

来源

蓝桥杯-历届试题