-
« 问题描述:
给定一个自然数n,由n开始可以依次产生半数集set(n)中的数如下。
(1) n∈set(n);
(2) 在n的左边加上一...
« 问题描述:
给定一个自然数n,由n开始可以依次产生半数集set(n)中的数如下。
(1) n∈set(n);
(2) 在n的左边加上一个自然数,但该自然数不能超过最近添加的数的一半;
(3) 按此规则进行处理,直到不能再添加自然数为止。
例如,set(6)={6,16,26,126,36,136}。半数集set(6)中有6 个元素。
注意半数集不是多重集。集合中已经有的元素不再添加到集合中。
« 编程任务:
对于给定的自然数n,编程计算半数集set(n)中的元素个数。
« 数据输入:
输入数据由文件名为input.txt的文本文件提供。
每个文件只有1 行,给出整数n。(0
- 2022-02-15 12:30:46下载
- 积分:1
-
源码收集器 收集好多的源码
源码收集器 收集好多的源码-source collected in many of the FO
- 2022-01-30 23:33:38下载
- 积分:1
-
themselves with a socket wrote in the Pocket PC using UDP socket
一个自己用socket写的在Pocket PC 上用的UDP socket-themselves with a socket wrote in the Pocket PC using UDP socket
- 2023-01-26 08:35:04下载
- 积分:1
-
一个餐饮关系系统,包括源码,系统说明,用SQL Server作为后台数据库...
一个餐饮关系系统,包括源码,系统说明,用SQL Server作为后台数据库-The relationship between a food system, including source code, the system shows
- 2022-06-03 14:41:54下载
- 积分:1
-
demonstration of how the dialog box to view the methods used vc 6.0.
演示了如何在对话框中加入视图的方法,采用vc++6.0.-demonstration of how the dialog box to view the methods used vc 6.0.
- 2022-01-25 16:44:26下载
- 积分:1
-
一个很好的磁盘清理程序的源码
一个很好的磁盘清理程序的源码-a good disk clean-up procedures FOSS
- 2022-03-19 20:43:28下载
- 积分:1
-
静态求两点间距离的程序,不输入点坐标,用VC++编写
静态求两点间距离的程序,不输入点坐标,用VC++编写-Static for the distance between two points of the procedure, do not enter a point of coordinates, with VC++ Prepared
- 2022-05-18 17:51:03下载
- 积分:1
-
VB6 到 VB。Net 转换 实例
VB6 到 VB。Net 转换 实例-VB6 to VB. Net conversion examples
- 2022-05-24 06:39:31下载
- 积分:1
-
一个用VC写的操作鼠标的小程序.
一个用VC写的操作鼠标的小程序.-a VC operation of the mouse to write small programs.
- 2022-03-05 08:24:33下载
- 积分:1
-
example of floodfill and scan
example of floodfill and scan-line algorithsm for filling bordered area. Source code is in c++.
- 2022-03-05 20:36:32下载
- 积分:1