文件名称:as
- 所属分类:
- 数值算法/人工智能
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1.97mb
- 下载次数:
- 0次
- 提 供 者:
- 竹**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
继续地被总计的一个走廊中有 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).
你的任务是写一个计画给输出多少门是最后途径后的公开?假定所有的门起先被关闭。
如果 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
..\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