文件名称:light-bulb
-
所属分类:
- 标签属性:
- 上传时间:2014-05-26
-
文件大小:867.49kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
一条长廊里依次装有n(1 ≤ n ≤ 65535)盏电灯,从头到尾编号1、2、3、…n-1、n。每盏电灯由一个拉线开关控制。开始,电灯全部关着。
有n个学生从长廊穿过。第一个学生把号码凡是1的倍数的电灯的开关拉一下;接着第二个学生把号码凡是2的倍数的电灯的开关拉一下;接着第三个学生把号码凡是3的倍数的电灯的开关拉一下;如此继续下去,最后第n个学生把号码凡是n的倍数的电灯的开关拉一下。n个学生按此规定走完后,长廊里电灯有几盏亮着。
注:电灯数和学生数一致。-A corridor in turn fitted n (1 ≤ n ≤ 65535) light bulb, from start to finish No. 1,2,3, ... n-1, n. Each light bulb controlled by a pull switch. Start, lights all closed. There are n number of students from across the promenade. The number of students who first light switch in multiples of 1 pull then the number of students who second light switch pull multiple of 2 then a third of the number of students who multiples of three light switches pull case continues, the last n-th number of students who light switch to a multiple of n pull. n After a student has completed this provision, there Jizhan lamp lit corridor. Note: The number of students and the number of lamps in line.
有n个学生从长廊穿过。第一个学生把号码凡是1的倍数的电灯的开关拉一下;接着第二个学生把号码凡是2的倍数的电灯的开关拉一下;接着第三个学生把号码凡是3的倍数的电灯的开关拉一下;如此继续下去,最后第n个学生把号码凡是n的倍数的电灯的开关拉一下。n个学生按此规定走完后,长廊里电灯有几盏亮着。
注:电灯数和学生数一致。-A corridor in turn fitted n (1 ≤ n ≤ 65535) light bulb, from start to finish No. 1,2,3, ... n-1, n. Each light bulb controlled by a pull switch. Start, lights all closed. There are n number of students from across the promenade. The number of students who first light switch in multiples of 1 pull then the number of students who second light switch pull multiple of 2 then a third of the number of students who multiples of three light switches pull case continues, the last n-th number of students who light switch to a multiple of n pull. n After a student has completed this provision, there Jizhan lamp lit corridor. Note: The number of students and the number of lamps in line.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
灭灯/Cpp2.cpp
灭灯/Cpp2.dsp
灭灯/Cpp2.dsw
灭灯/Cpp2.ncb
灭灯/Cpp2.opt
灭灯/Cpp2.plg
灭灯/Debug/Cpp2.exe
灭灯/Debug/Cpp2.ilk
灭灯/Debug/Cpp2.obj
灭灯/Debug/Cpp2.pch
灭灯/Debug/Cpp2.pdb
灭灯/Debug/vc60.idb
灭灯/Debug/vc60.pdb
灭灯/灭灯.dsw
灭灯/灭灯.ncb
灭灯/灭灯.opt
灭灯/Debug
灭灯
灭灯/Cpp2.dsp
灭灯/Cpp2.dsw
灭灯/Cpp2.ncb
灭灯/Cpp2.opt
灭灯/Cpp2.plg
灭灯/Debug/Cpp2.exe
灭灯/Debug/Cpp2.ilk
灭灯/Debug/Cpp2.obj
灭灯/Debug/Cpp2.pch
灭灯/Debug/Cpp2.pdb
灭灯/Debug/vc60.idb
灭灯/Debug/vc60.pdb
灭灯/灭灯.dsw
灭灯/灭灯.ncb
灭灯/灭灯.opt
灭灯/Debug
灭灯
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
