文件名称:as
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小: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
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
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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.