-
« 问题描述:
给定一个自然数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
-
一个数字化的时钟,希望对大家有用
一个数字化的时钟,希望对大家有用-A digital clock, in the hope that useful U.S.
- 2022-03-21 05:38:25下载
- 积分:1
-
VB的好用的日历例子
VB的好用的日历例子-VB example of the useful calendar
- 2022-03-06 07:20:30下载
- 积分:1
-
This example shows you how to make a "Find file" program, or you can juct compil...
This example shows you how to make a "Find file" program, or you can juct compile this code and use it. The program supports recursive tracking, too.
- 2022-11-15 03:25:03下载
- 积分:1
-
a search function in the source code
一个查找函数的源代码 -a search function in the source code
- 2022-11-22 18:30:03下载
- 积分:1
-
"warehouse management system Invoicing management"
《仓库管理系统之进销存管理》-"warehouse management system Invoicing management"
- 2023-02-23 13:30:04下载
- 积分:1
-
a simple calculator program
一个简单的计算器程序-a simple calculator program
- 2022-06-30 19:36:50下载
- 积分:1
-
这是我自己学习编写的代码集合 里面有老师讲的 自己改写的 都是一些简单的代码 但是每个代码都写了 很详细的注释 你不用看帮助文件就可以理解...
这是我自己学习编写的代码集合 里面有老师讲的 自己改写的 都是一些简单的代码 但是每个代码都写了 很详细的注释 你不用看帮助文件就可以理解-This the collection of my code for learning, including the teacher s code and modified by me. All of them are very simple, but including notation in detail. You can read it without help file.
- 2022-03-03 13:14:51下载
- 积分:1
-
初始油藏网格数较多,如何根据需要提取自己需要的网格参数呢?这是一值得一看的程序...
初始油藏网格数较多,如何根据需要提取自己需要的网格参数呢?这是一值得一看的程序-initial reservoir grid few more, how to extract their own needs, the need Grid parameters? This is an eye-catcher procedures
- 2023-09-08 20:40:02下载
- 积分:1
-
数字电子时钟,实现计时,闹钟,日期,倒计时功能!
数字电子时钟,实现计时,闹钟,日期,倒计时功能!-Digital electronic alarm clock, timing, and date, countdown function!
- 2022-08-06 09:12:29下载
- 积分:1