登录
首页 » 数据结构 » 一种基本算法! 现有一个酒店有100个房间,依次编号为1到100,第一个服务员经过,将所有房间门关上;第二个服务员经过将所有编号为2的倍数房门打开;第三个服务员...

一种基本算法! 现有一个酒店有100个房间,依次编号为1到100,第一个服务员经过,将所有房间门关上;第二个服务员经过将所有编号为2的倍数房门打开;第三个服务员...

于 2022-03-24 发布 文件大小:4.88 kB
0 286
下载积分: 2 下载次数: 1

代码说明:

一种基本算法! 现有一个酒店有100个房间,依次编号为1到100,第一个服务员经过,将所有房间门关上;第二个服务员经过将所有编号为2的倍数房门打开;第三个服务员经过将所有编号为3倍数的房门打开的关上,关闭的打开。依此类推;输入一个100以内的正整数N,输出第N服务员经过之后,所有房间的状态。-a basic algorithm! An existing 100 hotel rooms, followed by No. 1-100, after an attendant, all rooms will be closed; Second attendants after all No. 2 in multiples door open; Third attendants after all No. 3 multiples of the open door is shut, Guan the opening closed. XII; The importation of a hundred within the positive integer N, N output after attendants, all rooms in the state.

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 数据结构-遍历实验-data structure-traverse experiment
    2023-07-28 02:55:03下载
    积分:1
  • 实现B
    实现B-树的创建、插入、删除、遍历等功能,并以层序方式通过程序台显示输出。-B-tree to achieve the creation, insertion, deletion, traversal functions, and to sequence through the procedure showed that the output of Taiwan.
    2023-07-03 22:30:04下载
    积分:1
  • 应用程序,面向课程设计
    应用程序,面向课程设计-applications, design-oriented courses
    2022-01-28 17:24:14下载
    积分:1
  • Depth
    深度优先搜索求迷宫问题 采用深度优先搜索的方法求解迷宫问题,方便快捷-Depth-first search order to the maze problem using depth-first search method for solving a maze problem, convenient and quick
    2022-03-26 08:10:11下载
    积分:1
  • 小型库源代码较多,请耐心审阅勿用于商业交易,一经发现后果自负...
    小型数据库源代码较多,请耐心审阅勿用于商业交易,一经发现后果自负-small database source code more, not patience scrutiny for commercial transactions, the one found responsible for any consequences! !
    2022-06-12 22:29:41下载
    积分:1
  • simpleaccounts
    GnuCash是一个免费的会计软件,可以维护您的帐簿
    2023-07-03 01:20:03下载
    积分:1
  • “四皇后算法”的C语言实现,测试通过的,快来下载啊!
    “四皇后算法”的C语言实现,测试通过的,快来下载啊!-" Four Queens algorithm" C-language implementation, test passed, Come download ah!
    2022-02-22 05:55:31下载
    积分:1
  • 用VC编写的利用快速排序算法,运行你输入的要求后…
    使用VC编写的快速排序算法,运行后输入你希望产生的次数,会随机产生数值,并完成排序,是一个教好理解快速排序算法的程序。-prepared by the use of VC quicksort algorithm, running after you input the desired number of randomly generated digits and completed sequencing, is a good understanding of the fast algorithm procedures.
    2022-03-24 20:34:03下载
    积分:1
  • 对vb登录界面的设计,是一个比较好的界面设计
    对vb登录界面的设计,是一个比较好的界面设计-right vb login interface design is a good interface design
    2022-08-11 02:34:43下载
    积分:1
  • C 经典算法
    C 经典的数据结构算法  内容丰富,包含:底层编程、求进制、数组、问题算法、字符、汉诺塔、数学问题等丰富的单元,每个部分都有非常详细的C代码,可直接运行!
    2022-01-31 00:31:17下载
    积分:1
  • 696516资源总数
  • 106658会员总数
  • 16今日下载