-
« 问题描述:
给定一个自然数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
-
matlab code for extracting grid
matlab code for extracting grid-based color moment and wavelet texture features. simple but effective.
- 2022-02-25 14:54:05下载
- 积分:1
-
这一个定时提示服务和程序,这只是一个大体程序框架和设计理念,可在此基础上增加功能...
这一个定时提示服务和程序,这只是一个大体程序框架和设计理念,可在此基础上增加功能-A regular prompt services and procedures, it is only a general framework and design process can be on the basis of increasing the number of functional
- 2022-04-29 23:13:44下载
- 积分:1
-
该程序是利用概率算法,可以在该算法中设置大小…
这个程序是利用概率算法求可设大小得素数。-the procedure is the use of probabilistic algorithm can be set up for size in the prime.
- 2023-09-09 00:20:03下载
- 积分:1
-
基于VC++,单选按钮在有数字键盘的计算器中的应用
基于VC++,单选按钮在有数字键盘的计算器中的应用-Based on VC++, the radio button in the numeric keypad of the calculator application
- 2022-01-26 08:12:34下载
- 积分:1
-
Scribbler 2000 1.92 For Win9x/NT辅助建立 JavaScript, VBScript 的工具, 有预制的 Script 和 DHT...
Scribbler 2000 1.92 For Win9x/NT辅助建立 JavaScript, VBScript 的工具, 有预制的 Script 和 DHTML 可供选用.- The tool applying Scribbler 2000 1.92 For Win9x/NT to assistantly establish JavaScript, VBScript.we can choose Script and DHTML
- 2022-01-23 10:45:40下载
- 积分:1
-
VC6.0是用于地理信息系统技术的发展…
这是采用VC6.0开发的用于地理信息系统中图像查询,应用等,是我平时无聊时玩的写出的小程序。-VC6.0 This is used for the development of the geographic information system images inquiries, applications, I am usually bored playing the write small programs.
- 2022-02-25 22:07:30下载
- 积分:1
-
flex里图片截图程序,包括一个简单的算法
flex里图片截图程序,包括一个简单的算法-flex-ri pictures capture procedures, including a simple algorithm. . . . . . .
- 2022-05-23 18:28:59下载
- 积分:1
-
读硬盘参数的源代码
读硬盘参数的源代码-Reading drive parameters of the source code
- 2022-07-01 10:35:21下载
- 积分:1
-
8拼图使用DFS C++代码
本文用bfs解决了c++中的8个益智游戏
- 2022-09-18 23:00:04下载
- 积分:1