CDN加速镜像 | 设为首页 | 加入收藏夹
当前位置: 首页 资源下载 源码下载 数值算法/人工智能

文件名称:as

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

继续地被总计的一个走廊中有 n 锁柜从 1 对 n。最初,所有的锁柜门被关闭。你制造锁柜的 n 途径,每次出发与锁柜#1.在 ith 途径上, i = 1,2, .。。, n,你拨动每 ith 锁柜的门:如果门被关闭,你打开它,如果它是公开,你关它。举例来说,在第一的个途径每扇门之后是公开;在第二途径上你唯一的拨动偶数锁柜 (#2, #4, ...) 以便在第二途径之后,平坦的门被关闭,而且奇数的被打开;第三次经过你结束锁柜#3(从第一途径打开)的门,打开锁柜#6(关闭从第二途径)的门,等等。在最后途径之后,公开是哪些锁柜门和哪一个被关闭?多少他们是开着的?



你的任务是写一个计画给输出多少门是最后途径后的公开?假定所有的门起先被关闭。

如果 3 平均地进入 F(n)之内分开,印刷 " 是的 " 那个字。

-There are n lockers in a hallway numbered sequentially from 1 to n. Initially, all the locker doors are closed. You make n passes by the lockers, each time starting with locker#1. On the ith pass, i = 1, 2, ..., n, you toggle the door of every ith locker: if the door is closed, you open it, if it is open, you close it. For example, after the first pass every door is open on the second pass you only toggle the even-numbered lockers (#2,#4, ...) so that after the second pass the even doors are closed and the odd ones are opened the third time through you close the door of locker#3 (opened from the first pass), open the door of locker#6 (closed from the second pass), and so on. After the last pass, which locker doors are open and which are closed? How many of them are open?



Your task is write a program to output How many doors are open after the last pass? Assumptions all doors are closed at first.

Print the word "yes" if 3 divide evenly into F(n).
(系统自动生成,下载前可以参看下载内容)

下载文件列表

as/a.cpp
as/a.dsp
as/a.dsw
as/a.ncb
as/a.opt
as/a.plg
as/as.dsp
as/as.dsw
as/as.ncb
as/as.opt
as/as.plg
as/b.cpp
as/b.dsp
as/b.dsw
as/b.ncb
as/b.opt
as/b.plg
as/c.cpp
as/c.dsp
as/c.dsw
as/c.ncb
as/c.opt
as/c.plg
as/Debug/a.exe
as/Debug/a.ilk
as/Debug/a.obj
as/Debug/a.pch
as/Debug/a.pdb
as/Debug/b.pch
as/Debug/c.exe
as/Debug/c.ilk
as/Debug/c.obj
as/Debug/c.pch
as/Debug/c.pdb
as/Debug/vc60.idb
as/Debug/vc60.pdb
as/Debug
as

相关说明

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

相关评论

暂无评论内容.

发表评论

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