文件名称: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

..\a.dsp

..\a.dsw

..\a.ncb

..\a.opt

..\a.plg

..\as.dsp

..\as.dsw

..\as.ncb

..\as.opt

..\as.plg

..\b.cpp

..\b.dsp

..\b.dsw

..\b.ncb

..\b.opt

..\b.plg

..\c.cpp

..\c.dsp

..\c.dsw

..\c.ncb

..\c.opt

..\c.plg

..\Debug\a.exe

..\.....\a.ilk

..\.....\a.obj

..\.....\a.pch

..\.....\a.pdb

..\.....\b.pch

..\.....\c.exe

..\.....\c.ilk

..\.....\c.obj

..\.....\c.pch

..\.....\c.pdb

..\.....\vc60.idb

..\.....\vc60.pdb

..\Debug

as

相关说明

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

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org