-
« 问题描述:
给定一个自然数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
-
基于msp430的手写绘图板设计
本设计采用msp430这款单片机,通过对滑动在铜板上的表笔的信号采集,放大,运算,以及滤波,从而能够成功在LD显示屏上显示出来轨迹,但是此设计是三等奖作品,没有完全实现,使用的软件为CCS5.1
- 2023-02-21 02:10:03下载
- 积分:1
-
Tetris game procedures, procedures and the operation of the keyboard up and arou...
俄罗斯方块的游戏程序,程序的操作与键盘的上下,左右键一致,上键还起变形的作用,下键起加速的作用-Tetris game procedures, procedures and the operation of the keyboard up and around key agreement on the bond had a role in the deformation, the next key role in accelerating effect
- 2022-03-26 06:20:17下载
- 积分:1
-
MFC程序——调色板
一个基于MFC框架的应用程序,程序可以实现调色板的功能,通过滑块调节红、绿、蓝三个颜色分量的值来显示图形的不同的颜色,程序是VC++6.0上实现的。
- 2022-03-18 20:05:31下载
- 积分:1
-
Partners can easily solve the USB U Disk EasyUDisk module to read and write to r...
可以轻易解决优盘伴侣EasyUDisk读写U盘模块的读写,它是低端单片机操作U盘的最佳伴侣-Partners can easily solve the USB U Disk EasyUDisk module to read and write to read and write, it is the low-end single-chip set to operate the best partners U
- 2022-07-03 16:13:35下载
- 积分:1
-
It shows active drivers on your device and you can set the states of that driver...
It shows active drivers on your device and you can set the states of that driver.
- 2023-05-26 21:40:02下载
- 积分:1
-
随机文件存取。对文件的任意位置数据块进行删除、添加等功能的实现...
随机文件存取。对文件的任意位置数据块进行删除、添加等功能的实现-Random file acceseing. and realise such functions as deleting or adding data block in any position of file
- 2023-05-14 11:55:03下载
- 积分:1
-
可以在文件夹中删除不要的文件,支持层次搜索
可以在文件夹中删除不要的文件,支持层次搜索-can delete folders of documents should not support levels Search
- 2022-01-26 06:18:34下载
- 积分:1
-
Visual C++ 6.0项目开发指南
Visual C++ 6.0项目开发指南-Visual C 6.0 project development guidelines
- 2022-03-30 04:46:03下载
- 积分:1
-
VC6中的一些常用方法,掌握了会在程序开发中起到事半功倍的作用
VC6中的一些常用方法,掌握了会在程序开发中起到事半功倍的作用-VC6 some of the commonly used method, is in control of development in the effort to play the role of
- 2022-02-19 22:39:55下载
- 积分:1