CDN加速镜像 | 设为首页 | 加入收藏夹
当前位置: 首页 资源下载 源码下载 Windows编程 其他小程序

文件名称:a-questopn

  • 所属分类:
  • 标签属性:
  • 上传时间:
    2013-03-03
  • 文件大小:
    1kb
  • 已下载:
    1次
  • 提 供 者:
  • 相关连接:
  • 下载说明:
    别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容来自于网络,使用问题请自行百度

公元13世纪上半叶,蒙古军队一路西征杀向欧洲。在进军途中,蒙古骑兵以旗为单位沿一条道路相继开进。为了给后面的队伍指路,每当遇到一个道路分叉处时,就在路旁堆石头堆作路标,堆一堆石头表示直行,堆两堆石头表示右转,堆三堆石头表示左转。试用C语言编写一个程序,计算出通过的路口数目。假设每个相邻路口间路段的长度基本相等且开始的方向向西(以此判断第一个路口,即出发时向哪个方向走),用输出eswn四个字母或其组合来确定最终的地点相对于出发地(即第一个路口)的方位。



输入:只有一行,分别用1、2和3表示路口遇到的石碓的数量,最多有20个路口。

输出:只有一行,由一个数字和一个字母或两个字母组合分别构成路口的数目和最终地点与出发地的方位。如果需要输出两个字母,则输出字母按照字典序输出。



输入样例:

31

输出样例:

2,s

输入样例:

131

输出样例:

3,sw

-Half of the 13th century, the Mongol army expedition to kill all the way to Europe. Mongol horsemen to the flag in the march on the way, as a unit along a road successively entered. For guiding the team to back, turn right whenever encountered a road at the bifurcation on the roadside heap heap of stones as a signpost to heap a pile of stones, said straight heap piles of stones heap Sandui stone left turn. Trial C language to write a program, calculated by the number of junctions. Assuming the length of the section between each adjacent junctions basic equal direction westward (the beginning of the first intersection to judge, that is starting to which direction to go), output eswn four letters or a combination thereof to determine the final location From (ie intersection) relative to the orientation.



Input: only one line, respectively, with 1, 2 and 3 represents the intersection encountered stone pestle number, up to 20 junctions.

Output: only one line, the form number of the inte
(系统自动生成,下载前可以参看下载内容)

下载文件列表

a question about lukou.c

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 搜珍网是交换下载平台,只提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。更多...
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或换浏览器;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*快速评论: 推荐 一般 有密码 和说明不符 不是源码或资料 文件不全 不能解压 纯粹是垃圾
*内  容:
*验 证 码:
搜珍网 www.dssz.com