-
« 问题描述:
给定一个自然数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
-
B.C个人通讯录(
B.C个人通讯录(-Untreated personal directory (
- 2022-09-12 03:30:03下载
- 积分:1
-
A lot of additional features calculators, the use of a hotkey.
附加了 很多功能的 计算器,
实现了 热键的 使用。-A lot of additional features calculators, the use of a hotkey.
- 2023-02-20 13:35:03下载
- 积分:1
-
VBasic development of the bookstore management system, without passwords need to...
VBasic开发的书店管理系统,无密码,需要安装VBasic6.0才能运行。-VBasic development of the bookstore management system, without passwords need to install VBasic6.0 to run.
- 2023-06-11 01:00:04下载
- 积分:1
-
用vc++开发的密码破译小程序,很好玩。
用vc++开发的密码破译小程序,很好玩。-with vc++ code-breaking development of the small program is a lot of fun.
- 2022-01-31 16:39:24下载
- 积分:1
-
GaussianCluster
GaussianCluster 利用高斯混合模型实现对音频的无监督聚类,可以作为一个单独模块使用
- 2022-07-20 05:19:45下载
- 积分:1
-
DLL的DLL文件的访问路径
在DLL中获取本DLL文件的路径-the DLL access to the DLL files Path
- 2022-08-09 14:20:29下载
- 积分:1
-
C#编程发送邮件
C#编程发送邮件-C# programming mail
- 2022-07-07 09:33:55下载
- 积分:1
-
此代码为给出一个图形,求此图形的周长面积
此代码为给出一个图形,求此图形的周长面积-This gives a code for the graphics, the graphics for this perimeter area
- 2023-02-26 08:45:04下载
- 积分:1
-
单片机通过adc0809的模数转换程序,他可以有八个通路的模拟量输入端。...
单片机通过adc0809的模数转换程序,他可以有八个通路的模拟量输入端。-Single-chip microcomputer through the analog-to-digital conversion adc0809 procedures, he can have eight channels of analog input.
- 2023-02-11 07:55:03下载
- 积分:1